-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Illformed requirement when using powershell #1962
Comments
Does powershell handle quotes differently than the POSIX shell? What does this output? |
@segiddins The output using Powershell is:
On the command prompt, I got no output. Strange. |
No clue then, my best guess is that quoted args are handled differently (but I've never used powershell myself, so I can't say for certain) |
@segiddins Ah, I think the quotes need to be preserved explicitly:
Is this something we could handle on the backend? Or is it just a gotcha for powershell users? Because it needs to be handled by bundler somehow. |
I don't need the double quoting under zsh, so my guess is this is a peculiarity with PowerShell? |
@segiddins I think without the quotes it's trying to evaluate an expression instead of accepting the string literal. I'll have to dig into the command line parser to be sure, though. |
@djberg96 can you still reproduce this error? If so, can you try |
@duckinator will have to fire up a Windows VM to test, as I'm not really using Windows any more. |
Have to look at it later, but running the command in a command window seems to work (there is no output), but the same command in a PowerShell window does not. I was using:
A solution seems to be using (double) quotes, and 'backticking' them. As below:
A backtick is the Powershell escaping character, like |
@MSP-Greg Maybe we could handle it on the backend somehow then? While powershell users can get around it with extra quotes or backticks, it would be nicer and deals with the Bundler issue. |
@djberg96 is this still an issue for you? |
@bronzdoc Still happening as of rubygems 2.7.6, yes. |
@bronzdoc could we use the
That will return "Powershell" if powershell, or "CMD" if the old cmd shell. |
I think this issue is baked into windows, there is no fix for RG. Also, the 'greater-than' symbol is the issue, as without a backtick, it's considered a pipe character... Create a one line *.cmd file
Running the second example, you'll also have a file created named |
Forgot about something, it's called the 'stop-parsing symbol'
Unfortunately, when used from a cmd prompt, it's interpreted as a argument... |
A patch fixing this is appreciated, unfortunately i don't have a windows machine to test and debug. |
@djberg96 is this still an issue for you? |
@bronzdoc Not for me personally, no, though it's still an issue in general, mainly for bundler. I'll close it for now since it doesn't seem to be pressing. It can always be reopened later. |
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
Windows 10
Powershell 5.1
I'm getting a curious error when I try to use the --conservative option:
Curiously, I also see this when using the command shell if it's run via bundler, but not if I run it directly on the command line.
Back to powershell, I'm actually getting an error even without the --conservative option:
The text was updated successfully, but these errors were encountered: