mirror of
https://github.com/Borales/actions-yarn.git
synced 2026-04-05 12:22:22 +08:00
fix .npmrc file generation
When we pass an `auth-token`, a `.npmrc` file is generated but it's value could be invalid The parameter substitution to set a default value on `NPM_` was not working. Github action defines the `NPM_*` environment variables with a null value, but we were setting a default value only if the environment variable was not set at all.
This commit is contained in:
parent
4e4261c59f
commit
e0c8d84b6e
@ -4,9 +4,9 @@ set -e
|
||||
|
||||
if [ -n "$NPM_AUTH_TOKEN" ]; then
|
||||
# Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc
|
||||
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG-"$HOME/.npmrc"}"
|
||||
NPM_REGISTRY_URL="${NPM_REGISTRY_URL-registry.npmjs.org}"
|
||||
NPM_STRICT_SSL="${NPM_STRICT_SSL-true}"
|
||||
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-"$HOME/.npmrc"}"
|
||||
NPM_REGISTRY_URL="${NPM_REGISTRY_URL:-registry.npmjs.org}"
|
||||
NPM_STRICT_SSL="${NPM_STRICT_SSL:-true}"
|
||||
NPM_REGISTRY_SCHEME="https"
|
||||
if ! $NPM_STRICT_SSL
|
||||
then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user