Skip to content

Commit 814040a

Browse files
committed
fix: provide specific error message when notify-send is not installed
1 parent 17adbc4 commit 814040a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/integrations/notifications/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ async function showLinuxNotification(options: NotificationOptions): Promise<void
6060

6161
try {
6262
await execa("notify-send", [title, fullMessage])
63-
} catch (error) {
63+
} catch (error: any) {
64+
if (error.code === "ENOENT") {
65+
throw new Error(
66+
"notify-send is not installed. Please install libnotify-bin (apt install libnotify-bin on Debian/Ubuntu)",
67+
)
68+
}
6469
throw new Error(`Failed to show Linux notification: ${error}`)
6570
}
6671
}

0 commit comments

Comments
 (0)