Promote Out of date cache messages to error

This provides color so that the user can see them in the possible wall
of text that direnv sometimes spits out.
This commit is contained in:
Bryan Bennett 2023-10-31 12:02:36 -04:00
parent f452533db5
commit 999093c7e6
No known key found for this signature in database
GPG key ID: EF90E3E98B8F5C0B

View file

@ -253,9 +253,9 @@ use_flake() {
then
if [[ "$_nix_direnv_manual_reload" == "1" && -z "${_nix_direnv_force_reload-}" ]]; then
if [[ -e "$profile_rc" ]]; then
log_status "nix-direnv: cache is out of date. use \"nix-direnv-reload\" to reload"
log_error "nix-direnv: cache is out of date. use \"nix-direnv-reload\" to reload"
else
log_status "nix-direnv: cache does not exist. use \"nix-direnv-reload\" to create it"
log_error "nix-direnv: cache does not exist. use \"nix-direnv-reload\" to create it"
fi
else
@ -408,9 +408,9 @@ use_nix() {
then
if [[ "$_nix_direnv_manual_reload" == "1" && -z "${_nix_direnv_force_reload-}" ]]; then
if [[ -e "$profile_rc" ]]; then
log_status "nix-direnv: cache is out of date. use \"nix-direnv-reload\" to reload"
log_error "nix-direnv: cache is out of date. use \"nix-direnv-reload\" to reload"
else
log_status "nix-direnv: cache does not exist. use \"nix-direnv-reload\" to create it"
log_error "nix-direnv: cache does not exist. use \"nix-direnv-reload\" to create it"
fi
else
_nix_clean_old_gcroots "$layout_dir"