From 7ed178b579a419314aa2efbec38a2895517f90b9 Mon Sep 17 00:00:00 2001 From: Tom Janson Date: Wed, 19 Sep 2018 18:36:38 +0200 Subject: [PATCH 1/2] move usage example into --help text --- bin/remixd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/remixd b/bin/remixd index ed5edcabae..fb294219d2 100755 --- a/bin/remixd +++ b/bin/remixd @@ -19,8 +19,9 @@ program .option('-r, --rpc ', 'start rpc server. Values are CORS domain') .option('-rp, --rpc-port', 'rpc server port (default 8545)') .option('--profiler', 'start profiler service') -.parse(process.argv) -console.log('example: --dev-path /home/devchains/chain1 --mist --geth --frontend /home/frontend --frontend-port 8084 --auto-mine') +.on('--help', function(){ + console.log('\nExample:\n\n remixd --dev-path /home/devchains/chain1 --mist --geth --frontend /home/frontend --frontend-port 8084 --auto-mine') +}).parse(process.argv) program.outputHelp() var killCallBack = [] From 6c63bc3b1acc663a5c89f06a27291604a4ac1c3f Mon Sep 17 00:00:00 2001 From: Tom Janson Date: Wed, 19 Sep 2018 18:36:57 +0200 Subject: [PATCH 2/2] do not always output the help text this is confusing, since other programs show the help text if the user entered invalid options --- bin/remixd | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/remixd b/bin/remixd index fb294219d2..e2859b5048 100755 --- a/bin/remixd +++ b/bin/remixd @@ -22,7 +22,6 @@ program .on('--help', function(){ console.log('\nExample:\n\n remixd --dev-path /home/devchains/chain1 --mist --geth --frontend /home/frontend --frontend-port 8084 --auto-mine') }).parse(process.argv) -program.outputHelp() var killCallBack = []