mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-11 20:21:03 +00:00
Update shell.js
This commit is contained in:
parent
9f01733a5c
commit
df57b9f8d2
|
@ -24,7 +24,12 @@ exports.makeCmdLine = function(cmd) {
|
|||
return cmd;
|
||||
} else if (typeof(cmd) === "object") {
|
||||
return cmd.map(function(s) {
|
||||
return "\"" + exports.addslashes(s) + "\"";
|
||||
var regex = /[ "]/g;
|
||||
if (!regex.test(s)) {
|
||||
return s;
|
||||
} else {
|
||||
return "\"" + exports.addslashes(s) + "\"";
|
||||
}
|
||||
}).join(' ');
|
||||
} else {
|
||||
return "";
|
||||
|
|
Loading…
Reference in New Issue
Block a user