Skip to content

Commit 309cd78

Browse files
Vrtak-CZclaude
andcommitted
fix(desktop): buffer appimagetool download before writing to disk
Bun.write(path, Response) silently fails on GitHub Actions CI runners, causing the AppImage packaging to complete without actually creating the AppImage file. Switch to downloading the full response body as an ArrayBuffer first, then writing the buffer to disk. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d1b29ba commit 309cd78

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/desktop/scripts/package-appimage.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ exec "\${HERE}/../lib/klovi/bin/launcher" "$@"
200200
if (!response.ok) {
201201
fail(`Failed to download appimagetool: ${response.status} ${response.statusText}`);
202202
}
203-
await Bun.write(toolPath, response);
203+
// Use arrayBuffer() to fully download before writing — streaming a Response
204+
// directly via Bun.write() can silently fail on some CI environments.
205+
const toolBytes = await response.arrayBuffer();
206+
console.log(` Downloaded ${toolBytes.byteLength} bytes`);
207+
await Bun.write(toolPath, toolBytes);
204208
await run(["chmod", "+x", toolPath]);
205209

206210
// 9. Build the AppImage

0 commit comments

Comments
 (0)