From 911e3f05a15387f4697014882219688264131b74 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 31 Jul 2022 22:49:37 +0200 Subject: [PATCH] test: allow logger() to run w/o UNIX socket path Signed-off-by: Joachim Wiberg --- test/lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib.sh b/test/lib.sh index 5717c70..dc9ed58 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -108,7 +108,11 @@ logger() shift fi - ../src/logger -u "$sock" "$@" + if [ -f "$sock" ]; then + ../src/logger -u "$sock" "$@" + else + ../src/logger "$@" + fi } # shellcheck disable=SC2046,SC2086