Skip to content

Commit

Permalink
Fix PostgreSQL in MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wynlin committed Dec 6, 2021
1 parent 892c9bc commit 9bace81
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,21 @@ construct_configure_options() {
if [ "${PHP_WITHOUT_PDO_PGSQL:-no}" != "no" ]; then
configure_options="$configure_options"
else
configure_options="$configure_options --with-pdo-pgsql"
local operating_system=$(uname -a)

if [[ $operating_system =~ "Darwin" ]]; then
exit_if_homebrew_not_installed

local libpq_path=$(homebrew_package_path libpq)

if [ -n "$libpq_path" ]; then
configure_options="$configure_options --with-pdo-pgsql=$libpq_path"
else
export ASDF_PKG_MISSING="$ASDF_PKG_MISSING libpq"
fi
else
configure_options="$configure_options --with-pdo-pgsql"
fi
fi

echo "$configure_options"
Expand Down

0 comments on commit 9bace81

Please sign in to comment.