Skip to content

Commit 210646f

Browse files
committed
🐛 Fixed the issue of package icon under Windows
1 parent d152119 commit 210646f

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ npm run build:mac # macOS universal build
8484
- [ ] Test with weekly.tw93.fun URL
8585
- [ ] Verify remote icon functionality (https://gw.alipayobjects.com/os/k/fw/weekly.icns)
8686

87+
**Testing Notes:**
88+
89+
- Do NOT use `PAKE_NO_CONFIG_OVERWRITE=1` - this environment variable is not implemented
90+
- For testing, simply use: `node dist/cli.js https://example.com --name TestApp --debug`
91+
8792
## Core Components
8893

8994
### CLI Tool (`bin/`)

bin/options/icon.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ export async function handleIcon(options: PakeAppOptions, url?: string) {
155155
return defaultPngPath;
156156
}
157157

158-
// If nothing exists, let the error bubble up
159-
throw new Error('No default icon found for Windows build');
158+
// If nothing exists, return empty string to let merge.ts handle default icon
159+
logger.warn('✼ No default icon found, will use pake default.');
160+
return '';
160161
}
161162

162163
const iconPath = IS_LINUX

bin/options/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export default async function handleOptions(
6262
identifier: getIdentifier(url),
6363
};
6464

65-
appOptions.icon = await handleIcon(appOptions, url);
65+
const iconPath = await handleIcon(appOptions, url);
66+
appOptions.icon = iconPath || undefined;
6667

6768
return appOptions;
6869
}

0 commit comments

Comments
 (0)