-
Notifications
You must be signed in to change notification settings - Fork 76
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
should_run_under_cmd?
fails on windows when argument is an array
#154
Comments
Unfortunately there isn't really a clear semantic as to what running an array command should mean on Windows. There is no direct analogue as command lines are inherently string-y on Windows. Simulating the Unix behavior depends on what parser the command is using, though most follow the same conventions. See also: https://github.com/poise/poise/blob/ef560c82971b727f81aae3c9e36b1251848de14b/lib/poise/utils/win32.rb#L59-L100 |
hmm, I guess it's not as straight forward as I thought (joining the array into a sting) on windows. |
That is certainly an option, but wouldn't really have the same behavior as on Unix :) I would definitely like to see this improved, and lifting my code from poise into core is definitely an option, but there was some concern over the level of magic so we probably want something similar but maybe 5% less magic. |
This looks like it will solve the problem! What was the reason that this isn’t in core — I hope magic wasn’t the reason. 😛 |
This is a dup basically of #125 mixlib-shellout currently does not support array style arguments on windows. period. full stop. i made a run before at pulling noah's fixes into mixlib-shellout but failed due to some edge cases that we have tests for here in mixlib-shellout failing and being unable to turn them green. the full story of how utterly idiotic quoting cli stuff in windows is here: fixing #125 is not trivial. |
This issue comes from something discovered in chef-cookbooks/habitat PR.
When using similar to the following:
and debug stacktrace:
The text was updated successfully, but these errors were encountered: