Skip to content

Commit 4b0501b

Browse files
committed
fix: make GitHub Actions cleanup commands cross-platform compatible
- Use separate cleanup steps for Windows and Unix systems - Windows uses PowerShell Remove-Item commands - Unix systems continue using rm -rf commands - Fixes 'parameter cannot be found' error in GitHub Actions
1 parent a029723 commit 4b0501b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/build-binaries.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,20 @@ jobs:
3333
cache: npm
3434
cache-dependency-path: package-lock.json
3535

36-
- name: Clean up
36+
- name: Clean up (Unix)
37+
if: runner.os != 'Windows'
3738
run: |
3839
rm -rf node_modules package-lock.json || true
3940
npm cache clean --force || true
4041
42+
- name: Clean up (Windows)
43+
if: runner.os == 'Windows'
44+
run: |
45+
if (Test-Path node_modules) { Remove-Item -Recurse -Force node_modules }
46+
if (Test-Path package-lock.json) { Remove-Item -Force package-lock.json }
47+
npm cache clean --force
48+
shell: pwsh
49+
4150
- name: Install dependencies
4251
run: npm ci --no-audit --no-fund --progress=false
4352

0 commit comments

Comments
 (0)