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
Stack exec does not properly pass arguments to command on windows #813
Comments
Huh. Is this an optparse-applicative thing? |
It seems to work for me:
I tried this on Windows 10, using stack build from master. @themoritz, can you try it with the latest master, and can you provide more details about your environment if it still fails? |
I've confirmed that this works as expected on Windows as well, closing due to lack of repro. |
I can confirm that this is no longer an issue in newer stack versions (just tested with 0.1.5.0 on Windows 10). Sorry for the repro delay. |
No problem thanks for the confirmation |
I'm getting the issue reported above, with stack 0.1.6.0, 32-bit Windows, downloaded from the releases page. This is on Windows 7.
returns the version of stack, not cabal. I can't use stack exec on this machine because of this problem. |
I found a strange workaround. This works:
|
@jgm: I haven't been able to reproduce this on Windows, using stack-0.1.6.0 from the releases page (or stack built from master). There have been some changes to command-line argument parsing since 0.1.6.0 was released; perhaps try building the latest stack from master? |
@jgm, I am having the same experience. Using |
I was on Windows 7 too; I wonder if this is Windows-version +++ Björn Döring [Nov 24 15 13:51 ]:
|
Seems like this is worthy of re-opening, if it reliably repros on windows 7 (though, I haven't tried it). I wonder what it is about windows 7 argument parsing that does this? Is there something that can be done about it? I'm almost inclined to say "Lets document the limitation somewhere, and encourage use of bash or powershell instead". |
I was using powershell in Windows 7. +++ Michael Sloan [Nov 24 15 15:47 ]:
|
Me too. I just checked and it works as expected with the standard |
Ahah! So really it's a powershell thing, interesting! |
I can confirm all of the above. When I originally posted this issue I was using powershell on Win 7, too. |
I just tried PowerShell on Windows 10, and it didn't seem to exhibit this problem. I don't know anything about PowerShell, but this stackoverflow Q/A looks possibly relevant; it seems PowerShell interprets
If it's a PowerShell issue where it's not actually passing the first |
I just did, and I can confirm that quoting the "--" makes it So, I think your diagnosis is correct, and a FAQ entry +++ Emanuel Borsboom [Nov 25 15 04:13 ]:
|
On windows, stack does not pass all the arguments that come after the double dash
--
to the command. The following works:But the following does not (it shows stack's version):
This shows stack's usage (i.e. stack thinks the --global option is intended for stack):
All the above commands work as expected on linux.
The text was updated successfully, but these errors were encountered: