1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

treewide: deprecate VERBOSE_ECHO

The shell function `verboseEcho` can be used in its stead.
This commit is contained in:
Robert Helgesson 2024-01-23 22:59:26 +01:00
parent 190c6f4609
commit e84811035d
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
12 changed files with 68 additions and 29 deletions

View file

@ -48,6 +48,12 @@ function noteEcho() {
echo "${noteColor}$*${normalColor}"
}
function verboseEcho() {
if [[ -v VERBOSE ]]; then
echo "$*"
fi
}
function _i() {
local msgid="$1"
shift
@ -84,6 +90,12 @@ function _iNote() {
echo -n "${normalColor}"
}
function _iVerbose() {
if [[ -v VERBOSE ]]; then
_i "$@"
fi
}
# Runs the given command on live run, otherwise prints the command to standard
# output.
#