diff --git a/lib/menu.ts b/lib/menu.ts index b366400..ea3700a 100644 --- a/lib/menu.ts +++ b/lib/menu.ts @@ -392,16 +392,22 @@ async function parseRemotes(remotes: string[]) { let iconPath = await resolveResource('icons/favicon/icon.png') - try { - if (remoteInfo?.provider) { - iconPath = await resolveResource(`icons/small/providers/${remoteInfo.provider}.png`) - } else if (remoteInfo?.type) { - iconPath = await resolveResource(`icons/small/backends/${remoteInfo?.type}.png`) + if (['windows', 'macos'].includes(platform())) { + try { + if (remoteInfo?.provider) { + iconPath = await resolveResource( + `icons/small/providers/${remoteInfo.provider}.png` + ) + } else if (remoteInfo?.type) { + iconPath = await resolveResource(`icons/small/backends/${remoteInfo?.type}.png`) + } + } catch (error) { + Sentry.captureException( + new Error(`Error resolving icon path for ${remote}: ${error}`) + ) + Sentry.captureException(error) + console.error('Error resolving icon path for', remote, error) } - } catch (error) { - Sentry.captureException(new Error(`Error resolving icon path for ${remote}: ${error}`)) - Sentry.captureException(error) - console.error('Error resolving icon path for', remote, error) } parsedRemotes[remote] = {