Enable direnv bash hook if program is found
This commit is contained in:
@@ -11,3 +11,13 @@ abort() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Use this by setting a trap in your script, like so:
|
||||
# `trap at_exit EXIT`
|
||||
at_exit() {
|
||||
ret=$?
|
||||
if [[ $ret -gt 0 ]]; then
|
||||
error "The script failed with error $ret.\n"
|
||||
fi
|
||||
exit "$ret"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user