Skip to content

Commit

Permalink
Improve error message when user passes a single array argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 4, 2021
1 parent b3e96b0 commit 6d293b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const NO_ESCAPE_REGEXP = /^[\w.-]+$/;
const DOUBLE_QUOTES_REGEXP = /"/g;

const escapeArg = arg => {
if (NO_ESCAPE_REGEXP.test(arg)) {
if (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {
return arg;
}

Expand Down

0 comments on commit 6d293b9

Please sign in to comment.