Skip to content
Snippets Groups Projects
Commit 5900bd73 authored by Cédric OLIVIER's avatar Cédric OLIVIER
Browse files

Merge branch 'fix-pnpm-install' into 'master'

fix: check that pnpm is installed before using it

Closes #30

See merge request to-be-continuous/node!60
parents 46a8a435 891e4f75
No related branches found
No related tags found
No related merge requests found
...@@ -491,6 +491,8 @@ stages: ...@@ -491,6 +491,8 @@ stages:
- cd ${NODE_PROJECT_DIR} - cd ${NODE_PROJECT_DIR}
- guess_node_manager_system - guess_node_manager_system
- config_registry=${NODE_CONFIG_REGISTRY:-$NPM_CONFIG_REGISTRY} - config_registry=${NODE_CONFIG_REGISTRY:-$NPM_CONFIG_REGISTRY}
# pnpm should be installed before using it
- if [ "$NODE_MANAGER" = "pnpm" ]; then check_pnpm_installation; fi
# NPM_CONFIG_REGISTRY is not supported by old npm versions: force with cli # NPM_CONFIG_REGISTRY is not supported by old npm versions: force with cli
- if [[ "$config_registry" ]]; then $NODE_MANAGER config set registry $config_registry; fi - if [[ "$config_registry" ]]; then $NODE_MANAGER config set registry $config_registry; fi
- configure_scoped_registries - configure_scoped_registries
...@@ -500,7 +502,6 @@ stages: ...@@ -500,7 +502,6 @@ stages:
npm ci --prefer-offline $NODE_INSTALL_EXTRA_OPTS npm ci --prefer-offline $NODE_INSTALL_EXTRA_OPTS
;; ;;
pnpm) pnpm)
check_pnpm_installation
# leave automatic lockfile policy (see: https://pnpm.io/cli/install#--frozen-lockfile) # leave automatic lockfile policy (see: https://pnpm.io/cli/install#--frozen-lockfile)
pnpm install --prefer-offline $NODE_INSTALL_EXTRA_OPTS pnpm install --prefer-offline $NODE_INSTALL_EXTRA_OPTS
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment