Don't alter the path during the bundler cleanup on windows #241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After upgrading chef-dk to 0.18 which bumps ruby to 2.3.1, kitchen-vagrant breaks on windows when running in a bundled environment. Essentially vagrant is run in test-kitchen's ruby.
In the previous chef-dk ruby of 2.1.9, a bundled environment did not set the
GEM_HOME
variable so the problem code path here was never touched. Now on ruby 2.3.1, because GEM_HOME is present, kitchen-vagrant attempts to clean the path. This works fine on linux machines. However on windows, vagrant will use this altered path "as is" and its own attempts to prepend the path with the ruby in vagrant's omnibus install will be ignored.From whatI can tell, not cleaning the path has no adverse side effects. Perhaps this is because newer versions of vagrant do a better job of cleaning the environment on its side - thats just a guess.
Ultimately the fix for this may be in vagrant itself but this all happens VERY early in the vagrant process where the path is altered in a compiled EXE from the vagrant-installers WIX setup. So its more difficult to troubleshoot than I have cycles for. That code can be found at https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/windows_vagrant.bat.erb.