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.
This commit is contained in:
Marty Oehme 2020-09-23 16:41:36 +02:00
parent 238fa0ed65
commit 452ed51eb8
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -91,11 +91,9 @@ dbg_msg() {
esac esac
notify-send --urgency="$urgency" "$(tr '[:lower:]' '[:upper:]' <<<\["$application"])" "$@" 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 fi
# otherwise just print it out
printf "%b%-15s %s \u001b[0m\n" "$color" "$(tr '[:lower:]' '[:upper:]' <<<\["$application"])" "$@"
fi fi
} }