diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-unix.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh index 4fbc78413..4cefae0be 100755 --- a/scripts/build-unix.sh +++ b/scripts/build-unix.sh | |||
@@ -94,14 +94,14 @@ command_exists asdf && asdf reshim nodejs | |||
94 | 94 | ||
95 | # Ensure that the system dependencies are at the correct version | 95 | # Ensure that the system dependencies are at the correct version |
96 | # Check npm version | 96 | # Check npm version |
97 | EXPECTED_NPM_VERSION=$(jq --raw-output .engines.npm ./package.json) | 97 | EXPECTED_NPM_VERSION=$(node -p 'require("./package.json").engines.npm') |
98 | ACTUAL_NPM_VERSION=$(npm --version) | 98 | ACTUAL_NPM_VERSION=$(npm --version) |
99 | if [[ "$ACTUAL_NPM_VERSION" != "$EXPECTED_NPM_VERSION" ]]; then | 99 | if [[ "$ACTUAL_NPM_VERSION" != "$EXPECTED_NPM_VERSION" ]]; then |
100 | npm i -gf npm@$EXPECTED_NPM_VERSION | 100 | npm i -gf npm@$EXPECTED_NPM_VERSION |
101 | fi | 101 | fi |
102 | 102 | ||
103 | # Check pnpm version | 103 | # Check pnpm version |
104 | EXPECTED_PNPM_VERSION=$(jq --raw-output .engines.pnpm ./recipes/package.json) | 104 | EXPECTED_PNPM_VERSION=$(node -p 'require("./recipes/package.json").engines.pnpm') |
105 | ACTUAL_PNPM_VERSION=$(pnpm --version || true) # in case the pnpm executable itself is not present | 105 | ACTUAL_PNPM_VERSION=$(pnpm --version || true) # in case the pnpm executable itself is not present |
106 | if [[ "$ACTUAL_PNPM_VERSION" != "$EXPECTED_PNPM_VERSION" ]]; then | 106 | if [[ "$ACTUAL_PNPM_VERSION" != "$EXPECTED_PNPM_VERSION" ]]; then |
107 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION | 107 | npm i -gf pnpm@$EXPECTED_PNPM_VERSION |