-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Lines 116 to 123 in 8e99175
| } else { | |
| for (const arg of args) { | |
| script += ` ${escape.sh(arg)}` | |
| } | |
| realArgs.push('-c', script) | |
| } | |
| return promiseSpawn(command, realArgs, options, extra) |
We are concatenating the user provided arguments to the command_string, but POSIX shell -c flag allow extra arguments, one to set the $0 (process name) of the executed script from the command_string, and next ones to define the other positional arguments ($1, $2, $3...). It seems like a dumb change, but since we are just concatenating the strings to the real_args variable, $@ and $* are shown as empty, so for example it's not possible to use variables expansion with them like eslint ${@:-.} on package.json scripts to set current directory as default value if files argument are not provided when executing npm run.
Metadata
Metadata
Assignees
Labels
No labels