Skip to content

Commit 2d5999d

Browse files
committed
fix: make cleanup step cross-platform compatible
- Use conditional logic for Windows vs Unix commands in GitHub Actions - Windows: Remove-Item PowerShell command - Unix: rm -rf bash command - Fixes workflow failure on Windows builds
1 parent f6cd2dd commit 2d5999d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ jobs:
3434
node-version: 20
3535
- name: Clean up
3636
run: |
37-
rm -rf node_modules || true
37+
if [ "$RUNNER_OS" == "Windows" ]; then
38+
Remove-Item -Recurse -Force node_modules -ErrorAction SilentlyContinue
39+
else
40+
rm -rf node_modules || true
41+
fi
3842
npm cache clean --force || true
43+
shell: bash
3944
- run: npm ci
4045
- name: add macos cert
4146
if: contains(matrix.os.name, 'macos')

0 commit comments

Comments
 (0)