From 5a2631c4614d9d7322e8490c64da311d6986bab0 Mon Sep 17 00:00:00 2001 From: develar Date: Tue, 28 Mar 2017 09:28:23 +0200 Subject: [PATCH] feat(linux): support any icon name Close #1399 --- packages/electron-builder/src/targets/LinuxTargetHelper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/electron-builder/src/targets/LinuxTargetHelper.ts b/packages/electron-builder/src/targets/LinuxTargetHelper.ts index 6d2b55ad4a0..e1347997abf 100644 --- a/packages/electron-builder/src/targets/LinuxTargetHelper.ts +++ b/packages/electron-builder/src/targets/LinuxTargetHelper.ts @@ -63,7 +63,8 @@ export class LinuxTargetHelper { // If parseInt encounters a character that is not a numeral in the specified radix, // it returns the integer value parsed up to that point try { - const size = parseInt(file!, 10) + let sizeString = file.match(/\d+/) + const size = sizeString == null ? 0 : parseInt(sizeString[0], 10) if (size > 0) { const iconPath = `${iconDir}/${file}` mappings.push([iconPath, `${size}x${size}/apps/${this.packager.executableName}.png`])