Skip to content

Commit

Permalink
Ensure that RVM version strings can be converted to RubyGems format.
Browse files Browse the repository at this point in the history
References #56
  • Loading branch information
fnichol committed Nov 28, 2011
1 parent d9d3fe5 commit 3f65b91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/chef_rvm_set_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module RVM
module SetHelpers
def rvm_do(user = nil)
# Use Gem's version comparing code to compare the two strings
if Gem::Version.new(VersionCache.fetch_version(user)) < Gem::Version.new("1.8.6")
rvm_version = VersionCache.fetch_version(user).gsub(/(-|_|#)/, '.')
if Gem::Version.new(rvm_version) < Gem::Version.new("1.8.6")
"exec"
else
"do"
Expand Down

0 comments on commit 3f65b91

Please sign in to comment.