diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js index 39ad09a6c35b10..b853bdd539852e 100644 --- a/test/parallel/test-process-env-allowed-flags.js +++ b/test/parallel/test-process-env-allowed-flags.js @@ -6,8 +6,6 @@ require('../common'); // assert legit flags are allowed, and bogus flags are disallowed { const goodFlags = [ - '--inspect-brk', - 'inspect-brk', '--perf_basic_prof', '--perf-basic-prof', 'perf-basic-prof', @@ -17,8 +15,11 @@ require('../common'); '-r', 'r', '--stack-trace-limit=100', - '--stack-trace-limit=-=xX_nodejs_Xx=-' - ]; + '--stack-trace-limit=-=xX_nodejs_Xx=-', + ].concat(process.config.variables.v8_enable_inspector ? [ + '--inspect-brk', + 'inspect-brk', + ] : []); const badFlags = [ '--inspect_brk',