Browse Source

src: fix the misalinged text on "node --help"

The alignment of the argument descriptions in the "node --help"
text is off. This commit fixes the issue by adding two spaces
before each of the argument description.

PR-URL: https://github.com/nodejs/node/pull/10948
Fixes: https://github.com/nodejs/node/issues/10935
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
v6
Aashil Patel 8 years ago
committed by Rich Trott
parent
commit
5d27cc1d0d
  1. 19
      src/node.cc

19
src/node.cc

@ -3476,8 +3476,8 @@ void LoadEnvironment(Environment* env) {
static void PrintHelp() {
// XXX: If you add an option here, please also add it to doc/node.1 and
// doc/api/cli.md
printf("Usage: node [options] [ -e script | script.js ] [arguments] \n"
" node debug script.js [arguments] \n"
printf("Usage: node [options] [ -e script | script.js ] [arguments]\n"
" node debug script.js [arguments]\n"
"\n"
"Options:\n"
" -v, --version print Node.js version\n"
@ -3530,8 +3530,8 @@ static void PrintHelp() {
" --enable-fips enable FIPS crypto at startup\n"
" --force-fips force FIPS crypto (cannot be disabled)\n"
#endif /* NODE_FIPS_MODE */
" --openssl-config=path load OpenSSL configuration file from the\n"
" specified path\n"
" --openssl-config=path load OpenSSL configuration file from\n"
" the specified path\n"
#endif /* HAVE_OPENSSL */
#if defined(NODE_HAVE_I18N_SUPPORT)
" --icu-data-dir=dir set ICU data load path to dir\n"
@ -3544,10 +3544,11 @@ static void PrintHelp() {
#endif
"\n"
"Environment variables:\n"
"NODE_DEBUG ','-separated list of core modules that\n"
" should print debug information\n"
"NODE_DEBUG ','-separated list of core modules\n"
" that should print debug information\n"
"NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n"
"NODE_EXTRA_CA_CERTS path to additional CA certificates file\n"
"NODE_EXTRA_CA_CERTS path to additional CA certificates\n"
" file\n"
#if defined(NODE_HAVE_I18N_SUPPORT)
"NODE_ICU_DATA data path for ICU (Intl object) data\n"
#if !defined(NODE_HAVE_SMALL_ICU)
@ -3561,8 +3562,8 @@ static void PrintHelp() {
"NODE_PATH ':'-separated list of directories\n"
#endif
" prefixed to the module search path\n"
"NODE_REPL_HISTORY path to the persistent REPL history file\n"
"\n"
"NODE_REPL_HISTORY path to the persistent REPL history\n"
" file\n"
"Documentation can be found at https://nodejs.org/\n");
}

Loading…
Cancel
Save