fix: move installDir declaration before use (TDZ crash in updater)
All checks were successful
Build & Release / build (push) Successful in 2m58s
All checks were successful
Build & Release / build (push) Successful in 2m58s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ec61bbe5d5
commit
7e90058e7a
1 changed files with 2 additions and 2 deletions
|
|
@ -79,11 +79,11 @@ async function downloadAndInstall(url: string, version: string) {
|
|||
const res = await fetch(url);
|
||||
if (!res.ok) throw new Error(`Download failed: ${res.status}`);
|
||||
|
||||
const installDir = dirname(process.execPath);
|
||||
|
||||
await pipeline(Readable.fromWeb(res.body as Parameters<typeof Readable.fromWeb>[0]), createWriteStream(zipPath));
|
||||
console.log(`[updater] download complete, extracting to ${installDir}`);
|
||||
|
||||
const installDir = dirname(process.execPath);
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const cmd =
|
||||
process.platform === "win32"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue