mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 13:40:06 +00:00
Fix Windows CLI build: Add -Force to directory creation
The "Get pkg-fetch" step was failing because New-Item throws an error if the directory already exists. This can happen with GitHub Actions runner caching or when retrying failed jobs. Added -Force parameter to New-Item commands to handle existing directories gracefully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/build-cli.yml
vendored
4
.github/workflows/build-cli.yml
vendored
@@ -337,8 +337,8 @@ jobs:
|
||||
run: |
|
||||
cd $HOME
|
||||
$fetchedUrl = "https://github.com/yao-pkg/pkg-fetch/releases/download/v$env:_WIN_PKG_VERSION/node-v$env:_WIN_PKG_FETCH_VERSION-win-x64"
|
||||
New-Item -ItemType directory -Path .\.pkg-cache
|
||||
New-Item -ItemType directory -Path .\.pkg-cache\v$env:_WIN_PKG_VERSION
|
||||
New-Item -ItemType directory -Path .\.pkg-cache -Force
|
||||
New-Item -ItemType directory -Path .\.pkg-cache\v$env:_WIN_PKG_VERSION -Force
|
||||
Invoke-RestMethod -Uri $fetchedUrl `
|
||||
-OutFile ".\.pkg-cache\v$env:_WIN_PKG_VERSION\fetched-v$env:_WIN_PKG_FETCH_VERSION-win-x64"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user