@@ -250,6 +250,26 @@ jobs:
250
250
echo "READLINE_CFLAGS=-I$(brew --prefix readline)/include" >> $GITHUB_ENV
251
251
echo "READLINE_LIBS=-L$(brew --prefix readline)/lib -lreadline" >> $GITHUB_ENV
252
252
253
+ # Check if PostgreSQL is available and working
254
+ echo "Debug: Checking PostgreSQL availability:"
255
+ echo " PATH: $PATH"
256
+ echo " Checking pg_config:"
257
+ which pg_config || echo " pg_config not found in PATH"
258
+ pg_config --version 2>/dev/null || echo " pg_config version check failed"
259
+ echo " Checking libpq-fe.h:"
260
+ ls -la $(brew --prefix postgresql@17)/include/libpq-fe.h 2>/dev/null || echo " libpq-fe.h not found"
261
+ echo " Checking PostgreSQL installation:"
262
+ ls -la $(brew --prefix postgresql@17)/include/ 2>/dev/null | head -5 || echo " PostgreSQL include directory not found"
263
+ ls -la $(brew --prefix postgresql@17)/lib/ 2>/dev/null | head -5 || echo " PostgreSQL lib directory not found"
264
+
265
+ if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@17)/include/libpq-fe.h" ]]; then
266
+ echo "PostgreSQL found and working"
267
+ echo "POSTGRESQL_AVAILABLE=true" >> $GITHUB_ENV
268
+ else
269
+ echo "PostgreSQL not found or not working, will disable PostgreSQL support"
270
+ echo "POSTGRESQL_AVAILABLE=false" >> $GITHUB_ENV
271
+ fi
272
+
253
273
- name : Download and extract PHP source
254
274
run : |
255
275
cd ${{ env.BUILD_DIR }}
@@ -302,7 +322,7 @@ jobs:
302
322
fi
303
323
304
324
# Check if PostgreSQL is available and working
305
- if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@17)/include/libpq-fe.h " ]]; then
325
+ if [[ "$POSTGRESQL_AVAILABLE" == "true " ]]; then
306
326
echo "PostgreSQL found and working"
307
327
else
308
328
echo "PostgreSQL not found or not working, will disable PostgreSQL support"
0 commit comments