Fixed issue 3285
When using prerelease gems we need to ensure we store the gem version otherwise Bundler won't use the correct gem version since prerelease gems are not available by default. By storing the gem version for prerelease gems, we allow Bundler to properly resolve prerelease gems and not give potentially confusing errors to Vagrant users using prerelease plugins.
This commit is contained in:
parent
d4b3f226dd
commit
0a2992b92d
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue