Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@
# Put our scripts at the front of `PATH`.
PATH_add "$PWD/bin"

# Find `bin` folders on Linux and Homebrew systems. Add one of them to `PATH`;
# at least one `bin` directory needs to be on `PATH` for tests to pass.
case $(uname -s) in
Darwin) bins=(/opt/homebrew/opt/postgresql@*/bin) ;;
Linux) bins=(/usr/lib/postgresql/*/bin) ;;
*) bins=() ;;
esac

for dir in "${bins[@]}"; do
if [ -d "${dir}" ]; then
PATH_add "${dir}"
break
fi
done

unset dir bins

# End.
Loading