Skip to content

Commit

Permalink
fix: Quote zero-length strings in arguments (#1551)
Browse files Browse the repository at this point in the history
If a zero-length string is passed, it does not get properly quoted, and then it is not properly passed to the child process
  • Loading branch information
forivall authored and remy committed May 1, 2019
1 parent aa41ab2 commit 2973afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var utils = (module.exports = {
args.map(function (arg) {
// if an argument contains a space, we want to show it with quotes
// around it to indicate that it is a single argument
if (arg.indexOf(' ') === -1) {
if (arg.length > 0 && arg.indexOf(' ') === -1) {
return arg;
}
// this should correctly escape nested quotes
Expand Down

0 comments on commit 2973afb

Please sign in to comment.