mirror of
https://github.com/nodejs/node.git
synced 2025-04-29 06:19:07 +00:00

It was called --security-revert prior to 12.x, but changed in https://github.com/nodejs/node/pull/22490. See: https://github.com/nodejs/nodejs.org/pull/2412#issuecomment-521739752 PR-URL: https://github.com/nodejs/node/pull/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>
15 lines
449 B
JavaScript
15 lines
449 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { spawnSync } = require('child_process');
|
|
const os = require('os');
|
|
|
|
const { signal, status, output } =
|
|
spawnSync(process.execPath, ['--security-revert=not-a-cve']);
|
|
assert.strictEqual(signal, null);
|
|
assert.strictEqual(status, 12);
|
|
assert.strictEqual(
|
|
output[2].toString(),
|
|
`${process.execPath}: Error: ` +
|
|
`Attempt to revert an unknown CVE [not-a-cve]${os.EOL}`);
|