-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Cargo not properly escaping quotes in Windows command lines #1661
Comments
Hm, this is quite surprising! We've got Cargo builds working all the time on Windows, many of which depend on libc. Where are you running |
I tried in both PowerShell and cmd. Haven't tried msys2 bash but I can try that later |
I'm also unable to reproduce this in either cmd.exe or PowerShell. Do you know if anything could possibly be intercepting calls to |
It's certainly possible, thanks for trying to repro it. I'll try some things on different machines and see if I can narrow down the exact cause. I'm using Windows 10 Preview (I realize you probably don't "officially" support that yet ;)), so it's possible there's something coming down that line that may break this, though I doubt it. I've also got a fairly customized environment so it could be that something I'm doing is messing it up :). I'll keep investigating and re-open this if I find anything further. Thanks again for your help! |
Finally got a chance to try this on a fresh machine and it does not repro. So it definitely looks like it's an issue on my machine. Thanks for your help! |
No problem, thanks for investigating @anurse! |
* remove separate cargo manifest, cargo is built in now * rust really doesn't like running through a shim, so use env_add_path instead (see rust-lang/cargo#1661)
To circle back for anyone arriving via a search: The issue was with the Windows package manager I use (Scoop). I submitted a PR there to see if I could fix their |
I'm getting an error when trying to build code that depends on the
libc
crate in cargo:I have a small repro project at https://github.com/anurse/cargo-bug-repro, to repro this bug just do the following on a Windows machine:
rustc 1.2.0-nightly (f76d9bcfc 2015-05-28)
andcargo 0.2.0-nightly (ac61996 2015-05-17)
)doesnotwork
OR create a new binary crate that depends upon the libc cratecargo build
It looks like cargo is passing feature config switches to rustc, but the quotes are being stripped, probably by either the shell or the Windows command line parsing api CommandLineToArgvW (see also: http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx).
Obviously, this would likely repro in any crate that uses features, but
libc
is where I saw it.The text was updated successfully, but these errors were encountered: