Skip to content

Commit 2b9c0e1

Browse files
authored
Fix error message when user passes a single array argument (#468)
1 parent b3e96b0 commit 2b9c0e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const NO_ESCAPE_REGEXP = /^[\w.-]+$/;
1111
const DOUBLE_QUOTES_REGEXP = /"/g;
1212

1313
const escapeArg = arg => {
14-
if (NO_ESCAPE_REGEXP.test(arg)) {
14+
if (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {
1515
return arg;
1616
}
1717

0 commit comments

Comments
 (0)