Merge pull request #3301 from mitchellh/fix-issue-3285

core: fix prerelease gem versions
This commit is contained in:
Mitchell Hashimoto 2014-04-01 22:25:43 -07:00
commit 9c570adbd7
1 changed files with 4 additions and 2 deletions

View File

@ -72,9 +72,11 @@ module Vagrant
install_lambda.call install_lambda.call
end end
# If the version constraint is just a specific version, don't # If the version constraint is just a specific (non prerelease) version, don't
# store the constraint. # store the constraint.
opts.delete(:version) if opts[:version] && opts[:version] =~ /^\d/ if opts[:version] && opts[:version] =~ /^\d/ && !Gem::Requirement.parse(opts[:version])[1].prerelease?
opts.delete(:version)
end
# Add the plugin to the state file # Add the plugin to the state file
@user_file.add_plugin( @user_file.add_plugin(