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`])