-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix(getopt): Stop split arguments in getopt()
and ensure array by explicit arguments type
#5326
fix(getopt): Stop split arguments in getopt()
and ensure array by explicit arguments type
#5326
Conversation
…a-shim-to-an-exe-with-spaces-in-its-filepath
Okay, it's working now |
Better and more readable suggestion from @niheaven Co-authored-by: Hsiao-nan Cheung <[email protected]>
Better test case Co-authored-by: Hsiao-nan Cheung <[email protected]>
…paces-in-its-filepath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review
getopt()
and ensure array by exlicit arguments type
getopt()
and ensure array by exlicit arguments typegetopt()
and ensure array by explicit arguments type
e9e5240
to
b63c301
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why $argv
is split by space, but it does not break anything IMO. So this PR is LGTM.
Shit, the space is added by myself in #5210... I'll check it again.
getops handle space with quote
Correct #5313
Currently, getops parse with split space. With this correction, getops is more resilient and can parse in a more robust way with quote. Previously, 'parse this "sort of text"' => parse/this/sort/of/text
Now, 'parse this "sort of text"' => parse/this/sort of text
This correction can now handle parsing path with space (ex: c:\Program Files).
Closes #5313
How Has This Been Tested?
Use bug description, test on some other cases
Checklist:
develop
branch.