Skip to content

Commit

Permalink
display tray icon balloon when wakatime-cli exits non zero
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Dec 18, 2024
1 parent da8e459 commit 9450e96
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions electron/watchers/wakatime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ export class Wakatime {
LogLevel.ERROR,
true,
);
this.tray?.displayBalloon({
title: "WakaTime Error",
content: `Error when running wakatime-cli: ${err}`,
});
}
if (output) {
Logging.instance().log(
Expand Down Expand Up @@ -252,13 +256,6 @@ export class Wakatime {
);
return;
}
if (output) {
Logging.instance().log(
`Output from wakatime-cli when fetching code time: ${output}`,
LogLevel.ERROR,
true,
);
}
this.lastCodeTimeText = output;
this.tray?.setTitle(` ${output}`);
this.tray?.setToolTip(` ${output}`);
Expand Down

0 comments on commit 9450e96

Please sign in to comment.