Skip to content

Commit 6741f13

Browse files
matej21claude
andcommitted
fix: use ESM import for png-to-ico in Windows CI step
png-to-ico is an ESM-only module and cannot be loaded with require(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 416de8e commit 6741f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
133133
# Convert PNG to ICO
134134
$iconIco = Join-Path $buildDir "app-icon.ico"
135-
node -e "const p=require('$($tempDir -replace '\\','/')'+'/node_modules/png-to-ico');const fs=require('fs');p('$($iconPng -replace '\\','/')').then(b=>fs.writeFileSync('$($iconIco -replace '\\','/')',b))"
135+
node --input-type=module -e "import p from '$($tempDir -replace '\\','/')/node_modules/png-to-ico/index.js';import{writeFileSync as w}from'fs';const b=await p('$($iconPng -replace '\\','/')');w('$($iconIco -replace '\\','/')',b);"
136136
137137
# Embed icon into executables and copy .ico for shortcuts
138138
$rcedit = Join-Path $tempDir "node_modules\rcedit\bin\rcedit-x64.exe"

0 commit comments

Comments
 (0)