Skip to content

Commit c7f89af

Browse files
committed
ci: use npm prefix for windows PATH
1 parent ce84f8a commit c7f89af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ jobs:
9393
- name: Add npm global bin to PATH (Windows)
9494
if: matrix.os == 'windows-latest'
9595
run: |
96-
$globalBin = npm bin -g
96+
$globalPrefix = (npm config get prefix).Trim()
97+
if (-not $globalPrefix) {
98+
$globalPrefix = Join-Path $env:APPDATA "npm"
99+
}
100+
$globalBin = $globalPrefix
97101
$globalBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
98102
99103
- uses: astral-sh/setup-uv@v7

0 commit comments

Comments
 (0)