-
Notifications
You must be signed in to change notification settings - Fork 0
/
.npmrc
24 lines (21 loc) · 1.16 KB
/
.npmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Always colorize stdout
color=always
# Don't allow `npm install` unless the NodeJS version complies
# with the `engines` field in package.json
# npm only blocks `install`, while yarn will block all scripts
engine-strict=true
# For some reason, `npm run` doesn't use the default shell,
# nor the one from the `$SHELL` env var.
# It also doesn't allow `/usr/bin/env bash`, `process.env.SHELL`,
# or `$0`, so it has to be set manually here.
#
# Note: Any env vars must be encapsulated in braces, i.e. `${SHELL}` instead of `$SHELL`.
# See:
# https://answers.netlify.com/t/support-guide-using-private-npm-modules-on-netlify/795/30?page=2
#
# Default to Bash since we have npm scripts that use job control and, even if SHELL is set in GitHub's CI/CD Yaml configs,
# that only applies for the first command. In our case, the first command is always an npm script, i.e. `npm <my-script>`,
# rather than a Bash command (using grep, sed, etc.).
# As such, the execution order goes `bash --> npm --> sh` for any npm script using shell commands.
# But we want `bash --> npm --> bash` which is only possible if we change npm's default shell from within npm's own configs.
script-shell=bash