-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Vagrant 1.8.1 is dependent on Cygwin #6788
Comments
I'd like to add that this is the area of the debug trace that seems to cause issues
Versions I'm using: |
As a workaround I'd recommend running vagrant commands in Git bash -- https://git-for-windows.github.io/ |
That would work, however, in our environment that is just as problematic as running cygwin. We've reverted to Vagrant 1.7.4. |
I can't reproduce this running on Windows 10, Vagrant 1.8.1, VirtualBox 5.0.12.
I only can reproduce it if I add a directory that contains "cygwin" to my PATH (but this directory does not exist):
This is caused by this assumption: https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/util/platform.rb#L20-L23 So what does your PATH environment contain? |
Doh. That's rather simple. I can't believe I didn't look at that. I do have cygwin in my PATH (c:\bin\cygwin for what it matters), but I don't have the bin folder in my PATH. I installed cygwin a while back using Chocolatey so I guess it didn't add that to the PATH. In my case, I'll just uninstall cygwin |
My path contains c:\tools\cygwin, but not to c:\tools\cygwin\bin. I guess that's some remnant from a chocolatey install. |
I ran into this bug as well. I just installed vagrant via chocolatey and get the same error. I see that my path includes That implies that a clean install of Windows + Chocolately + vagrant will fail. Or, in other words, vagrant won't work when installed via chocolatey. |
I found this is an issue on my osx Vagrant setup as well... having any cygwin reference in your PATH renders Vagrant to error out not able to find the cygpath executable |
I found changing from "C:\tools\cygwin" to "C:\tools\cygwin\bin" made it work. |
Hi all, This appears to be a bug in the chocolately installer. Has anyone raised the issue with those maintainers? |
Just learned of this - Chocolatey doesn't create the Cygwin variable nor does it depend on Cygwin. So more appropriately this is an issue with the community package for Cygwin on the default community repository - that package is maintained in this repo - https://github.com/chocolatey/chocolatey-coreteampackages. Please raise the issue there. Thanks! |
I also never ran into this issue and I have a Chocolatey-installed Vagrant (even 1.8.1 for the verifier service), so I'm pretty sure this is more an issue only if you've also installed the cygwin package as well. @Swoogan the cygwin package is what creates the PATH variable you are seeing. |
FWIW I looked at the code @StefanScherer pointed out - you can take Choco out of the equation entirely. Just put the word cygwin in your PATH variable somewhere. :) |
As an explanation for the cygwin package because I think I know what is going on - the path to the cygwin setup exe is needed for running cyg-get (another package that helps manage cygwin packages), the actual packages installed by cygwin are not put on PATH, they are left for when you start the bash shell to keep from conflicting with Windows tools. |
I just hit this while running my own build from source. I'm not sure what changed on my system because this all worked when I submitted PR #7738 . For reference, here's my $ENV:PATH
|
I downloaded http://www.paehl.com/open_source/?download=curl_750_2.zip and extracted curl.exe to c:\ruby22\bin\curl.exe, tried again, and it got further but still failed. I suspect the best goal here is to get CURB working instead on my Win32 setup and hopefully it won't need curl.exe. hmm.
|
What about using all the tools that are in the embedded folder of the Vagrant installation? |
Closing this now as it seems to be mainly related to non-standard installation issues and local configurations. If the problem persists, please open a new issue. Thanks! |
@chrisroberts so there is better cygwin detection now - vagrant doesn't simply look for cygwin in the PATH? |
Sorry, that was a question. If that is not fixed then it is still an issue. |
There is a good repro and what is causing the issue in @StefanScherer 's comments at #6788 (comment) |
Why is vagrant even looking at my PATH to detect cygwin? I have cygwin on my path for other work, why does this make it impossible to use vagrant? |
@chrisroberts This is not a "non-standard installation issue", vagrant is checking for something on my PATH that has nothing to do with vagrant, then making some incorrect assumptions and choking. The bug is with vagrant, not cygwin or the environment in which the problem arises. |
@masaeedu Okay, so the core of the problem is having Cygwin installed, but running vagrant outside of Cygwin which results in errors because it is getting a false positive of running within a Cygwin environment. Is that a correct assessment? |
@chrisroberts I'm not familiar with how Vagrant detects cygwin internally, and for what purpose, but that seems like a good assessment. I have cygwin installed, and I have the binaries on my PATH, but I am not running vagrant from a bash shell. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
On windows, with vagrant 1.81., when running vagrant up, I get this message
I do not have cygwin installed on my environment, nor have I seen that this is required.
The text was updated successfully, but these errors were encountered: