The output from goassume when --exec is provided now returns the arguments with proper escaping/splitting to ensure they are evaluated when passed to sh -c in the assume script.
Why?
Fixes the use of assume --exec when the command has multiple arguments or spaces. This issue was introduced by #549 and this PR resolves #575
How did you test it?
When directly running assumego the final arguments can be seen to be concatenated together incorrectly and the single argument with spaces becomes multiple:
$ assumego <profile> --exec -- cmd with multiple 'arguments and spaces'
...None None cmd withmultiplearguments and spaces
After the fix the commands are properly separated/escaped:
$ dassumego <profile> --exec -- cmd with multiple 'arguments and spaces'
...None None cmd with multiple 'arguments and spaces'
What changed?
The output from
goassume
when--exec
is provided now returns the arguments with proper escaping/splitting to ensure they are evaluated when passed tosh -c
in theassume
script.Why?
Fixes the use of
assume --exec
when the command has multiple arguments or spaces. This issue was introduced by #549 and this PR resolves #575How did you test it?
When directly running
assumego
the final arguments can be seen to be concatenated together incorrectly and the single argument with spaces becomes multiple:After the fix the commands are properly separated/escaped:
A full end-to-end test:
Potential risks
If someone has come to rely on this broken concatenation/escaping since #549 it could break their usage.
Is patch release candidate?
Yes
Link to relevant docs PRs
N/A