Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't alter the path during the bundler cleanup on windows #241

Merged
merged 1 commit into from
Dec 5, 2016
Merged

Conversation

mwrock
Copy link
Member

@mwrock mwrock commented Sep 17, 2016

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.

@mwrock mwrock closed this Dec 1, 2016
@mwrock mwrock reopened this Dec 5, 2016
@mwrock mwrock force-pushed the winbun branch 3 times, most recently from dfb8ccf to b26181e Compare December 5, 2016 18:52
@mwrock mwrock merged commit 2d4b2c7 into master Dec 5, 2016
@mwrock mwrock deleted the winbun branch December 5, 2016 19:06
@afiune afiune added the Bug label Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants