You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a quoted string is present in $Args, it is treated as one string. get-opt.ps1 does not check for quoted strings and will split them if they contain spaces.
Expected Behavior
A path containing spaces should not be split if it is enclosed with single- or double-quotes.
Splitting arguments by spaces is redundant. The $Args variable is an array of strings which have already been split by whitespace. Doing so again is redundant and can lead to issues like this one.
I recommend requiring users to enclose an arguments in in quotes if it must contain whitespace.
Linked Issues: #5313, #5326
Bug Report
Current Behavior
Scoop/libexec/scoop-shim.ps1
Line 49 in f930280
Scoop/lib/getopt.ps1
Line 28 in f930280
When a quoted string is present in
$Args
, it is treated as one string. get-opt.ps1 does not check for quoted strings and will split them if they contain spaces.Expected Behavior
A path containing spaces should not be split if it is enclosed with single- or double-quotes.
test with...
Additional context/output
Possible Solution
Splitting arguments by spaces is redundant. The
$Args
variable is an array of strings which have already been split by whitespace. Doing so again is redundant and can lead to issues like this one.I recommend requiring users to enclose an arguments in in quotes if it must contain whitespace.
System details
Scoop Configuration
The text was updated successfully, but these errors were encountered: