From a73b845ffd43483f8805d70a742f4a266f78a264 Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:31:24 -0500 Subject: [PATCH] Fix Windows CLI build: Add -Force to directory creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/build-cli.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 414c043b89e..75d5e2353c3 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -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"