Skip to content

Commit

Permalink
src: rename --security-reverts to ...-revert
Browse files Browse the repository at this point in the history
It was called --security-revert prior to 12.x, but changed in
#22490.

See:
nodejs/nodejs.org#2412 (comment)

PR-URL: #29153
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
sam-github authored and Trott committed Aug 17, 2019
1 parent 93b341e commit 5dee17b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,12 @@ PerProcessOptionsParser::PerProcessOptionsParser(
&PerProcessOptions::debug_arraybuffer_allocations,
kAllowedInEnvironment);

AddOption("--security-reverts", "", &PerProcessOptions::security_reverts);

// 12.x renamed this inadvertently, so alias it for consistency within the
// release line, while using the original name for consistency with older
// release lines.
AddOption("--security-revert", "", &PerProcessOptions::security_reverts);
AddAlias("--security-reverts", "--security-revert");
AddOption("--completion-bash",
"print source-able bash completion script",
&PerProcessOptions::print_bash_completion);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-security-revert-unknown.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { spawnSync } = require('child_process');
const os = require('os');

const { signal, status, output } =
spawnSync(process.execPath, ['--security-reverts=not-a-cve']);
spawnSync(process.execPath, ['--security-revert=not-a-cve']);
assert.strictEqual(signal, null);
assert.strictEqual(status, 12);
assert.strictEqual(
Expand Down

0 comments on commit 5dee17b

Please sign in to comment.