Skip to content

Font download crashes on Windows: unzip command not available #32

@blueberrycongee

Description

@blueberrycongee

Problem

electron/main.ts lines 753 and 768 use the Unix unzip command to extract font files:

execSync(`unzip -l "${tmpZip}"`, { encoding: "utf-8" });  // line 753
execSync(`unzip -jo "${tmpZip}" "${innerPath}" -d "${fontsDir}"`, ...);  // line 768

Windows does not have unzip installed by default. execSync will throw an error, crashing the font download flow.

Suggested fix

Use a Node.js library (e.g. yauzl, adm-zip) or PowerShell's Expand-Archive on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsWindows platform specific

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions