Skip to content

Commit 14119c4

Browse files
committed
process: unify experimental warning messages
1 parent 66b76e2 commit 14119c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/internal/process/pre_execution.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const {
3030
exposeLazyInterfaces,
3131
defineReplaceableLazyAttribute,
3232
setupCoverageHooks,
33+
emitExperimentalWarning,
3334
} = require('internal/util');
3435

3536
const {
@@ -538,8 +539,7 @@ function initializePermission() {
538539
};
539540
// Guarantee path module isn't monkey-patched to bypass permission model
540541
ObjectFreeze(require('path'));
541-
process.emitWarning('Permission is an experimental feature',
542-
'ExperimentalWarning');
542+
emitExperimentalWarning('Permission');
543543
const { has } = require('internal/process/permission');
544544
const warnFlags = [
545545
'--allow-addons',
@@ -628,8 +628,7 @@ function initializeSourceMapsHandlers() {
628628

629629
function initializeFrozenIntrinsics() {
630630
if (getOptionValue('--frozen-intrinsics')) {
631-
process.emitWarning('The --frozen-intrinsics flag is experimental',
632-
'ExperimentalWarning');
631+
emitExperimentalWarning('Frozen intristics');
633632
require('internal/freeze_intrinsics')();
634633
}
635634
}

0 commit comments

Comments
 (0)