mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Fix warnings not being printed
This commit is contained in:
parent
69a5b2175e
commit
374b328270
1 changed files with 11 additions and 9 deletions
20
direnvrc
20
direnvrc
|
|
@ -15,16 +15,18 @@ _nix_direnv_info() {
|
|||
}
|
||||
|
||||
_nix_direnv_warning() {
|
||||
if [[ -n $DIRENV_LOG_FORMAT ]]; then
|
||||
local msg=$* color_normal='' color_warning=''
|
||||
if [[ -t 2 ]]; then
|
||||
color_normal="\e[m"
|
||||
color_warning="\e[33m"
|
||||
fi
|
||||
# shellcheck disable=SC2059
|
||||
printf "${color_warning}${DIRENV_LOG_FORMAT}${color_normal}\n" \
|
||||
"${_NIX_DIRENV_LOG_PREFIX}${msg}" >&2
|
||||
local msg=$*
|
||||
local color_normal=""
|
||||
local color_warning=""
|
||||
|
||||
if [[ -t 2 ]]; then
|
||||
color_normal="\e[m"
|
||||
color_warning="\e[33m"
|
||||
fi
|
||||
|
||||
printf "%b" "$color_warning"
|
||||
log_status "${_NIX_DIRENV_LOG_PREFIX}${msg}"
|
||||
printf "%b" "$color_normal"
|
||||
}
|
||||
|
||||
_nix_direnv_error() { log_error "${_NIX_DIRENV_LOG_PREFIX}$*"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue