fix(macos): don't crash on undefined variable

This commit is contained in:
Daniele Varrazzo 2025-01-05 21:51:57 +01:00
parent cee23d83e0
commit 6cd0fbdc49

View File

@ -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.
@ -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