Skip to content

Commit

Permalink
Fix error message when user passes a single array argument (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 4, 2021
1 parent b3e96b0 commit 2b9c0e1
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 2b9c0e1

Please sign in to comment.