Skip to content

Commit d194d20

Browse files
AshCrippscodebytere
AshCripps
authored andcommitted
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent c184929 commit d194d20

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
@@ -635,7 +635,7 @@ Write reports in a compact format, single-line JSON, more easily consumable
635635
by log processing systems than the default multi-line format designed for
636636
human consumption.
637637

638-
### `--report-directory=directory`
638+
### --report-dir=directory`, `report-directory=directory`
639639
<!-- YAML
640640
added: v11.8.0
641641
changes:
@@ -1224,7 +1224,7 @@ Node.js options that are allowed are:
12241224
* `--prof-process`
12251225
* `--redirect-warnings`
12261226
* `--report-compact`
1227-
* `--report-directory`
1227+
* `--report-dir`, `--report-directory`
12281228
* `--report-filename`
12291229
* `--report-on-fatalerror`
12301230
* `--report-on-signal`

doc/node.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Write
294294
.Sy diagnostic reports
295295
in a compact format, single-line JSON.
296296
.
297-
.It Fl -report-directory
297+
.It Fl -report-dir Fl -report-directory
298298
Location at which the
299299
.Sy diagnostic report
300300
will be generated.

src/node_options.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,12 @@ PerProcessOptionsParser::PerProcessOptionsParser(
664664
"output compact single-line JSON",
665665
&PerProcessOptions::report_compact,
666666
kAllowedInEnvironment);
667-
AddOption("--report-directory",
667+
AddOption("--report-dir",
668668
"define custom report pathname."
669-
" (default: current working directory of Node.js process)",
669+
" (default: current working directory)",
670670
&PerProcessOptions::report_directory,
671671
kAllowedInEnvironment);
672+
AddAlias("--report-directory", "--report-dir");
672673
AddOption("--report-filename",
673674
"define custom report file name."
674675
" (default: YYYYMMDD.HHMMSS.PID.SEQUENCE#.txt)",

0 commit comments

Comments
 (0)