kopia lustrzana https://github.com/c9/core
Fix --helpWithSudo
rodzic
034d78aeb8
commit
5f9de12c30
|
@ -84,6 +84,7 @@ function main(argv, config, onLoaded) {
|
||||||
.describe("domains", "Primary and any secondary top-level domains to use (e.g, c9.io,c9.dev)")
|
.describe("domains", "Primary and any secondary top-level domains to use (e.g, c9.io,c9.dev)")
|
||||||
.describe("exclude", "Exclude specified service")
|
.describe("exclude", "Exclude specified service")
|
||||||
.describe("include", "Include only specified service")
|
.describe("include", "Include only specified service")
|
||||||
|
.describe("helpWithSudo", "Ask for sudo password on startup")
|
||||||
.default("domains", inContainer && process.env.C9_HOSTNAME || process.env.C9_DOMAINS)
|
.default("domains", inContainer && process.env.C9_HOSTNAME || process.env.C9_DOMAINS)
|
||||||
.boolean("help")
|
.boolean("help")
|
||||||
.describe("help", "Show command line options.");
|
.describe("help", "Show command line options.");
|
||||||
|
@ -107,7 +108,7 @@ function main(argv, config, onLoaded) {
|
||||||
var delayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) !== -1 });
|
var delayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) !== -1 });
|
||||||
var notDelayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) === -1 });
|
var notDelayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) === -1 });
|
||||||
|
|
||||||
if (options.helpWithSudo)
|
if (options.argv.helpWithSudo)
|
||||||
return child_process.execFile("sudo", ["echo -n"], main.bind(null, argv.filter(function(a) {
|
return child_process.execFile("sudo", ["echo -n"], main.bind(null, argv.filter(function(a) {
|
||||||
return a !== "--helpWithSudo";
|
return a !== "--helpWithSudo";
|
||||||
}), config, onLoaded));
|
}), config, onLoaded));
|
||||||
|
|
Ładowanie…
Reference in New Issue