diff --git a/src/node_options.cc b/src/node_options.cc index e2a39626b69fd3..2086214e65f735 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -645,7 +645,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); diff --git a/test/parallel/test-security-revert-unknown.js b/test/parallel/test-security-revert-unknown.js index 688076ce94582a..11f31ccd834406 100644 --- a/test/parallel/test-security-revert-unknown.js +++ b/test/parallel/test-security-revert-unknown.js @@ -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(