Merge pull request +13780 from c9/multi-abuse-wsmonitor-use-gssh-cache

Make gssh force use cache for extra wsmonitor / abuse commands
pull/299/head
Tim Robinson 2016-05-09 10:54:22 -04:00
commit 6f83744f9a
1 zmienionych plików z 6 dodań i 3 usunięć

9
node_modules/c9/gce.js wygenerowano vendored
Wyświetl plik

@ -24,12 +24,15 @@ function runCommand(pattern, command, options, callback) {
return runCommand(pattern, command, {}, options);
}
var parallel = ""
var optionsArray = [];
if (options.parallel) {
parallel = " -P"
optionsArray.push("-P");
}
if (options.cacheOnly) {
optionsArray.push("--cache-only");
}
var gsshCommand = GSSH + " " + parallel + " " + pattern + " '" + command + "'";
var gsshCommand = GSSH + " " + optionsArray.join(" ") + " " + pattern + " '" + command + "'";
childProcess.exec(gsshCommand, function (err, stdout) {
return callback(err, stdout);
});