From d90f59f78b7312da3ed55738a1d2fa11baa78843 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 20 May 2026 14:01:04 +0100 Subject: fix(waybar): refactor A && B || C patterns to avoid shellcheck SC2015 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Older shellcheck (Ubuntu's in CI) flags '[ test ] && cmd || true' as SC2015 because, despite the intent, A && B || C is not equivalent to if-then-else (C runs when A is true but B fails). Replace with explicit 'if … fi' or split into two 'A || continue' guards. Functionally identical, lint-clean across versions. --- dot_config/waybar/executable_snx-vpn-toggle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dot_config/waybar/executable_snx-vpn-toggle.sh') diff --git a/dot_config/waybar/executable_snx-vpn-toggle.sh b/dot_config/waybar/executable_snx-vpn-toggle.sh index 12738af..c21643b 100644 --- a/dot_config/waybar/executable_snx-vpn-toggle.sh +++ b/dot_config/waybar/executable_snx-vpn-toggle.sh @@ -16,4 +16,4 @@ case "$state" in esac pid=$(pidof waybar || true) -[ -n "$pid" ] && kill -SIGRTMIN+9 "$pid" 2>/dev/null || true +if [ -n "$pid" ]; then kill -SIGRTMIN+9 "$pid" 2>/dev/null || true; fi -- cgit v1.3.1