Skip to content

Commit 73877ef

Browse files
committed
ci: export npm prefix for windows jobs
1 parent 8b7aaec commit 73877ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ jobs:
9797
if (-not $globalPrefix) {
9898
$globalPrefix = Join-Path $env:APPDATA "npm"
9999
}
100-
$globalBin = $globalPrefix
101-
$globalBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
100+
"NPM_CONFIG_PREFIX=$globalPrefix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
101+
"npm_config_prefix=$globalPrefix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
102+
$binPaths = @($globalPrefix, (Join-Path $globalPrefix "bin")) | Where-Object { Test-Path $_ }
103+
foreach ($binPath in $binPaths) {
104+
$binPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
105+
}
102106
103107
- uses: astral-sh/setup-uv@v7
104108
with:

0 commit comments

Comments
 (0)