Skip to content

Commit 17a098b

Browse files
AshCrippsaddaleax
AshCripps
authored andcommittedSep 22, 2020
cli: add alias for report-directory to make it consistent
Currently every other cli option uses "dir" to reference a directory so add an alias to allow for conistency. PR-URL: #33587 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 4d0129a commit 17a098b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
 

‎doc/api/cli.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ Write reports in a compact format, single-line JSON, more easily consumable
632632
by log processing systems than the default multi-line format designed for
633633
human consumption.
634634

635-
### `--report-directory=directory`
635+
### --report-dir=directory`, `report-directory=directory`
636636
<!-- YAML
637637
added: v11.8.0
638638
changes:
@@ -1180,7 +1180,7 @@ Node.js options that are allowed are:
11801180
* `--prof-process`
11811181
* `--redirect-warnings`
11821182
* `--report-compact`
1183-
* `--report-directory`
1183+
* `--report-dir`, `--report-directory`
11841184
* `--report-filename`
11851185
* `--report-on-fatalerror`
11861186
* `--report-on-signal`

‎doc/node.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Write
300300
.Sy diagnostic reports
301301
in a compact format, single-line JSON.
302302
.
303-
.It Fl -report-directory
303+
.It Fl -report-dir Fl -report-directory
304304
Location at which the
305305
.Sy diagnostic report
306306
will be generated.

‎src/node_options.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,12 @@ PerProcessOptionsParser::PerProcessOptionsParser(
665665
"output compact single-line JSON",
666666
&PerProcessOptions::report_compact,
667667
kAllowedInEnvironment);
668-
AddOption("--report-directory",
668+
AddOption("--report-dir",
669669
"define custom report pathname."
670-
" (default: current working directory of Node.js process)",
670+
" (default: current working directory)",
671671
&PerProcessOptions::report_directory,
672672
kAllowedInEnvironment);
673+
AddAlias("--report-directory", "--report-dir");
673674
AddOption("--report-filename",
674675
"define custom report file name."
675676
" (default: YYYYMMDD.HHMMSS.PID.SEQUENCE#.txt)",

0 commit comments

Comments
 (0)
Please sign in to comment.