diff --git a/lib/command.js b/lib/command.js index ab8887e857..859b006a06 100644 --- a/lib/command.js +++ b/lib/command.js @@ -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; }