Skip to content

Commit 56874aa

Browse files
committed
never append ':' to the end of PKG_CONFIG_PATH in .homebrew-build-env
if `PKG_CONFIG_PATH` is not set, then `.homebrew-build-env` adds a spurious `:` at the end. This PR fixes this
1 parent 9f90540 commit 56874aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.homebrew-build-env

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ for l in bzip2 texinfo polymake; do
88
fi
99
done
1010
export PATH
11-
PKG_CONFIG_PATH="$HOMEBREW/lib/pkgconfig:$PKG_CONFIG_PATH"
11+
if [ -z "$PKG_CONFIG_PATH" ]; then
12+
PKG_CONFIG_PATH="$HOMEBREW/lib/pkgconfig"
13+
else
14+
PKG_CONFIG_PATH="$HOMEBREW/lib/pkgconfig:$PKG_CONFIG_PATH"
15+
fi
1216
# libpng.pc depends on zlib.pc
1317
for l in openblas openssl readline sqlite zlib; do
1418
if [ -d "$HOMEBREW/opt/$l/lib/pkgconfig" ]; then

0 commit comments

Comments
 (0)