Skip to content

Commit

Permalink
fix(macos): don't crash on undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Jan 5, 2025
1 parent cee23d8 commit 6cd0fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build/build_libpq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ case "$ID" in
# openssl no matter what so remove it. Since homebrew's curl depends on
# it, force use of system curl.
brew uninstall --force --ignore-dependencies openssl gettext curl
if [ -z "$MACOSX_ARCHITECTURE" ]; then
if [ -z "${MACOSX_ARCHITECTURE:-}" ]; then
MACOSX_ARCHITECTURE="$(uname -m)"
fi
# Set the deployment target to be <= to that of the oldest supported Python version.
Expand Down Expand Up @@ -110,7 +110,7 @@ if [ "$ID" == "centos" ] || [ "$ID" == "macos" ]; then

options=(--prefix=${LIBPQ_BUILD_PREFIX} --openssldir=${LIBPQ_BUILD_PREFIX} \
zlib -fPIC shared)
if [ -z "$MACOSX_ARCHITECTURE" ]; then
if [ -z "${MACOSX_ARCHITECTURE:-}" ]; then
./config $options
else
./configure "darwin64-$MACOSX_ARCHITECTURE-cc" $options
Expand Down

0 comments on commit 6cd0fbd

Please sign in to comment.