Skip to content

Commit

Permalink
Fix windows build error
Browse files Browse the repository at this point in the history
for gh actions
  • Loading branch information
xyloflake authored Apr 27, 2024
1 parent 55a5150 commit 3c1695c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ jobs:
with:
version: latest

- name: Fix pnpm bug # https://github.com/electron-userland/electron-builder/issues/6933#issuecomment-1213438889
if: matrix.os == 'windows-latest'
run: |
# Get the version of pnpm
$pnpmVersion = pnpm -v
# Construct the file path with the pnpm version
$file = "C:\Users\runneradmin\setup-pnpm\node_modules\.pnpm\pnpm@$pnpmVersion\node_modules\pnpm\bin\pnpm.cjs"
# Read the content of the file
$content = Get-Content $file
# Replace the target string
$content = $content -replace "#!/usr/bin/env node", "#!node"
# Write the modified content back to the file
$content | Set-Content $file
Write-Host "Replacement complete."
- name: Set up Electron cache
uses: actions/cache@v4
with:
Expand Down

0 comments on commit 3c1695c

Please sign in to comment.