diff --git a/index.js b/index.js index 9980625..7ac1bff 100644 --- a/index.js +++ b/index.js @@ -217,5 +217,5 @@ function exitmsg (code, signal) { * Quote value for `exec`. */ function quote (str) { - return `'${str.replace(/'/g, "'\\''")}'` -} \ No newline at end of file + return `"${str.replace(/["\\$`!]/g, '\\$&')}"` +}