diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md index aab8d769dc9e2..73c4b1c7a748a 100644 --- a/docs/content/commands/npm-run-script.md +++ b/docs/content/commands/npm-run-script.md @@ -220,6 +220,8 @@ it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. +This value is not exported to the environment for child processes. + diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 858fe4d638bed..71dab98a3831e 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -762,6 +762,8 @@ it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. +This value is not exported to the environment for child processes. + diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 316e737091eb4..7ff0eeb1283c5 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -880,6 +880,7 @@ define('https-proxy', { define('if-present', { default: false, type: Boolean, + envExport: false, description: ` If true, npm will not exit with an error code when \`run-script\` is invoked for a script that isn't defined in the \`scripts\` section of diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index b18b8e7a829e6..91f0d782878a3 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -795,6 +795,8 @@ This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. + +This value is not exported to the environment for child processes. ` exports[`test/lib/utils/config/definitions.js TAP > config description for ignore-scripts 1`] = ` diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index 564ade46e731d..7b13c34daf682 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -636,6 +636,8 @@ it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. +This value is not exported to the environment for child processes. +