diff options
author | Maximilian Antoni <mail@maxantoni.de> | 2015-03-30 23:35:27 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-04-03 08:15:16 +0300 |
commit | 78005ebb6f4103c20f077669c3929b7ea46a4c0d (patch) | |
tree | 167c8273f33fe9f9ce917d6c4e6a07062e95cf0b /lib | |
parent | 91f5cb1fb91520fbe25a4da5b80848ed540b9ad3 (diff) |
run-script: always quote args
Fixes #7743.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/run-script.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/run-script.js b/lib/run-script.js index b6aa5fe7e..bf72bf814 100644 --- a/lib/run-script.js +++ b/lib/run-script.js @@ -189,8 +189,7 @@ function run (pkg, wd, cmd, args, cb) { function joinArgs (args) { var joinedArgs = "" args.forEach(function(arg) { - if (arg.match(/[ '"]/)) arg = '"' + arg.replace(/"/g, '\\"') + '"' - joinedArgs += " " + arg + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' }) return joinedArgs } |