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