Skip to content

Commit f8d8ad5

Browse files
committed
Fix the --no-notifications CLI flag for the notifier plugin
There was a logic error where it would trigger the same behavior as if no suitable notifier command was found, i.e. fall back to Java desktop tray notification handling.
1 parent 4e1b3c4 commit f8d8ad5

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Unreleased
22

3-
- Add specs for kaocha.plugin/profiling data (#302).
4-
53
## Added
64

5+
- Add specs for kaocha.plugin/profiling data (#302).
6+
77
## Fixed
88

99
- Fix issue where diffing `(is (= ...))` assertions sometimes fails
1010
when comparing records.
11+
- Fix the `--no-notifications` flag in the Notifier plugin
1112

1213
## Changed
1314

1415
- Some error codes were duplicated. This is a **breaking change** if you rely on error codes.
15-
1616
- When a test suite configuration value is not a collection or symbol, the
1717
error code is now 250 instead of 252. The error code 252 is still used
1818
when the configuration file fails to load.

src/kaocha/plugin/notifier.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157
(::notifications? config true)))))
158158

159159
(post-run [result]
160-
(if-let [command (and (::notifications? result) (::command result))]
161-
(run-command command result)
162-
(send-tray-notification result))
160+
(when (::notifications? result)
161+
(if-let [command (::command result)]
162+
(run-command command result)
163+
(send-tray-notification result)))
163164
result))

0 commit comments

Comments
 (0)