Skip to content

Commit 9af1728

Browse files
ptomatoNathanWalker
authored andcommitted
Support NPM versions that don't export config environment variables
The automatic exportation of environment variables based on the config key in package.json was removed in later versions of Node.js. Here, we manually set the environment variable if it's not automatically set.
1 parent 64604d9 commit 9af1728

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/export_npm_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/bash -e
2+
3+
npm_package_config_V8=${npm_package_config_V8:-$(node -p 'require("./package.json").config.V8')}
4+
25
if [[ ${CIRCLECI} ]]; then
36
echo "export VERSION=${npm_package_version}" >> $BASH_ENV
47
echo "export V8_VERSION=${npm_package_config_V8}" >> $BASH_ENV

0 commit comments

Comments
 (0)