Skip to content

Commit

Permalink
Make sure we exit if postinstall fails
Browse files Browse the repository at this point in the history
pipefail would be ideal here but not sure how wide the support is yet.
  • Loading branch information
code-asher committed Aug 18, 2023
1 parent 187543b commit 99837dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/build/npm-postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ install_with_yarn_or_npm() {
# HACK: NPM's use of semver doesn't like resolving some peerDependencies that vscode (upstream) brings in the form of pre-releases.
# The legacy behavior doesn't complain about pre-releases being used, falling back to that for now.
# See https://github.com//pull/5071
npm install --unsafe-perm --legacy-peer-deps --omit=dev
if ! npm install --unsafe-perm --legacy-peer-deps --omit=dev ; then
exit 1
fi
;;
yarn*)
yarn --production --frozen-lockfile --no-default-rc
if ! yarn --production --frozen-lockfile --no-default-rc ; then
exit 1
fi
;;
*)
echo "Could not determine which package manager is being used to install code-server"
Expand Down

0 comments on commit 99837dd

Please sign in to comment.