Compare commits

...

2 Commits

Author SHA1 Message Date
Thomas Boyer bf46c4f28f
Merge 01e06b931a into d82669199b 2024-12-30 11:17:48 +01:00
Thomas Boyer 01e06b931a feat(direnv): warn user if direnv not found
Instead of silently not installing the shell hooks, issue a warning (then keep doing nothing).
2024-12-10 15:20:44 +01:00
1 changed files with 5 additions and 2 deletions

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 ! command -v direnv &>/dev/null; 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;