fix: using printf cmd properly

This commit is contained in:
Borales
2018-12-30 11:37:25 +01:00
parent 8384843b2f
commit 5101185ef5
+1 -1
View File
@@ -8,7 +8,7 @@ if [ -n "$NPM_AUTH_TOKEN" ]; then
NPM_REGISTRY_URL="${NPM_REGISTRY_URL-registry.npmjs.org}"
# Allow registry.npmjs.org to be overridden with an environment variable
printf "//$NPM_REGISTRY_URL/:_authToken=$NPM_AUTH_TOKEN\nregistry=$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG"
printf "//%s/:_authToken=%s\nregistry=%s" "$NPM_REGISTRY_URL" "$NPM_AUTH_TOKEN" "$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG"
chmod 0600 "$NPM_CONFIG_USERCONFIG"
fi