From 452ed51eb817f46e5360922a32ca4968ca61f1f6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 23 Sep 2020 16:41:36 +0200 Subject: [PATCH] Fix debug information printing Will print debug info to libnotify but additionally print everything to stdout now. This should help when explicitly invoking styler from a shell (by setting `export STYLER_DEBUG=2` or `=3`) and either reading the output there or redirecting it to a file. --- utilities.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/utilities.sh b/utilities.sh index 60bc808..99c2b9b 100644 --- a/utilities.sh +++ b/utilities.sh @@ -91,11 +91,9 @@ dbg_msg() { esac notify-send --urgency="$urgency" "$(tr '[:lower:]' '[:upper:]' <<<\["$application"])" "$@" - else - # otherwise just print it out - printf "%s: 📦 %s must be installed for this function.\n" "$2" "$1" - printf "%b%-15s %s \u001b[0m\n" "$color" "$(tr '[:lower:]' '[:upper:]' <<<\["$application"])" "$@" fi - + # otherwise just print it out + printf "%b%-15s %s \u001b[0m\n" "$color" "$(tr '[:lower:]' '[:upper:]' <<<\["$application"])" "$@" fi + }