From 9a0f663ece347d98219a7e3fbd76fa7c7bffa49c Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Sun, 3 Jan 2016 13:57:00 +0100 Subject: [PATCH] Fix --helpWithSudo --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 2ecaed27..a64ebe82 100755 --- a/server.js +++ b/server.js @@ -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("exclude", "Exclude 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) .boolean("help") .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 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 a !== "--helpWithSudo"; }), config, onLoaded));