File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,13 @@ jobs:
110110 cache : " npm"
111111 cache-dependency-path : " **/package-lock.json"
112112 - uses : oven-sh/setup-bun@v2
113+ - name : Prefer npm global on windows
114+ if : runner.os == 'Windows'
115+ # On Windows by default PATH prefers corepack bundled with Node.js
116+ # This prepends npm global to PATH to ensure that npm installed global corepack is used instead
117+ run : |
118+ echo "$(npm config get prefix)" >> "$GITHUB_PATH"
119+ shell : bash
113120 - name : setup pnpm/yarn
114121 run : |
115122 npm install -g corepack
@@ -293,6 +300,13 @@ jobs:
293300 node-version : ${{ steps.decide-node-version.outputs.version }}
294301 cache : " npm"
295302 cache-dependency-path : " **/package-lock.json"
303+ - name : Prefer npm global on windows
304+ if : runner.os == 'Windows'
305+ # On Windows by default PATH prefers corepack bundled with Node.js
306+ # This prepends npm global to PATH to ensure that npm installed global corepack is used instead
307+ run : |
308+ echo "$(npm config get prefix)" >> "$GITHUB_PATH"
309+ shell : bash
296310 - name : setup pnpm/yarn
297311 run : corepack enable
298312 shell : bash
You can’t perform that action at this time.
0 commit comments