1
0
Fork 0

fix(direnv): warn user if command not found (#12840)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
Thomas Boyer 2025-01-23 20:37:00 +01:00 committed by GitHub
parent bd0a5b2598
commit 1bae199736
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,8 @@
# Don't continue if direnv is not found
command -v direnv &>/dev/null || return
# If direnv is not found, don't continue and print a warning
if (( ! $+commands[direnv] )); then
echo "Warning: direnv not found. Please install direnv and ensure it's in your PATH before using this plugin."
return
fi
_direnv_hook() {
trap -- '' SIGINT;