Skip to content

Commit

Permalink
tools: do not run Corepack code before it's reviewed
Browse files Browse the repository at this point in the history
Also enable running `make corepack-update` when `node`/`npm` is not
available globally.

PR-URL: #53405
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
aduh95 authored and marco-ippolito committed Jul 19, 2024
1 parent b8944f6 commit daab9e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1151,13 +1151,14 @@ pkg: $(PKG)
.PHONY: corepack-update
corepack-update:
mkdir -p /tmp/node-corepack
curl -qLo /tmp/node-corepack/package.tgz "$$(npm view corepack dist.tarball)"
curl -qLo /tmp/node-corepack/package.tgz "$$($(call available-node,$(NPM) view corepack dist.tarball))"

rm -rf deps/corepack && mkdir deps/corepack
cd deps/corepack && tar xf /tmp/node-corepack/package.tgz --strip-components=1
chmod +x deps/corepack/shims/*

node deps/corepack/dist/corepack.js --version
$(call available-node,'-p' \
'require(`./deps/corepack/package.json`).version')

.PHONY: pkg-upload
# Note: this is strictly for release builds on release machines only.
Expand Down

0 comments on commit daab9e1

Please sign in to comment.