Skip to content

Commit bd0ef96

Browse files
fix(bld): parse options.app.icon correctly during build mode
1 parent 6ab1ea3 commit bd0ef96

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ const setLinuxConfig = async ({ app, outDir }) => {
256256
GenericName: app.genericName,
257257
NoDisplay: app.noDisplay,
258258
Comment: app.comment,
259-
Icon: path.resolve(outDir, 'package.nw', path.basename(app.icon)),
259+
Icon: app.icon ? path.resolve(outDir, 'package.nw', app.icon) : '',
260260
Hidden: app.hidden,
261261
OnlyShowIn: app.onlyShowIn,
262262
NotShowIn: app.notShowIn,

src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const parse = async (options, pkg) => {
239239
options.app.name = options.app.name.replace(/[<>:"/\\|?*\u0000-\u001F]/g, '');
240240
}
241241
/* Path to where the icon currently is in the filesystem */
242-
options.app.icon = options.app.icon ?? undefined;
242+
options.app.icon = options.app.icon ?? pkg.window?.icon ?? undefined;
243243
if (options.app.icon) {
244244
options.app.icon = path.resolve(options.app.icon);
245245
}

0 commit comments

Comments
 (0)