remove(tools,docker): stderr ignore making it hard to debug

This commit is contained in:
2026-02-22 21:06:47 +01:00
parent ce44dde2c6
commit 1f33854b27
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ fi
echo "Waiting for PostgreSQL to be ready..." echo "Waiting for PostgreSQL to be ready..."
for i in {1..30}; do for i in {1..30}; do
if docker exec "$CONTAINER" psql -U "$POSTGRES_USER" -c '\q' 2>/dev/null; then if docker exec "$CONTAINER" psql -U "$POSTGRES_USER" -c '\q'; then
echo "PostgreSQL is ready in container $CONTAINER" echo "PostgreSQL is ready in container $CONTAINER"
exit 0 exit 0
fi fi
+1 -1
View File
@@ -22,7 +22,7 @@ if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
exit 1 exit 1
fi fi
if ! docker exec "$CONTAINER" psql -U postgres -c '\q' 2>/dev/null; then if ! docker exec "$CONTAINER" psql -U postgres -c '\q'; then
echo "Error: PostgreSQL not accessible in container: $CONTAINER" >&2 echo "Error: PostgreSQL not accessible in container: $CONTAINER" >&2
exit 1 exit 1
fi fi
+1 -1
View File
@@ -23,7 +23,7 @@ if [ ! -d "$TEST_DIR" ]; then
exit 1 exit 1
fi fi
if ! psql -d "$DB" -c '\q' 2>/dev/null; then if ! psql -d "$DB" -c '\q'; then
echo "Error: cannot connect to database: $DB" >&2 echo "Error: cannot connect to database: $DB" >&2
echo "Ensure the database exists and is accessible" >&2 echo "Ensure the database exists and is accessible" >&2
exit 1 exit 1
+1 -1
View File
@@ -34,7 +34,7 @@ if [ -f "$CONTROL_FILE" ]; then
fi fi
# Remove all SQL files (versioned and upgrade scripts) # Remove all SQL files (versioned and upgrade scripts)
SQL_FILES_COUNT=$(find "$EXTDIR" -name "${PROJECT_FILENAME}--*.sql" -type f 2>/dev/null | wc -l) SQL_FILES_COUNT=$(find "$EXTDIR" -name "${PROJECT_FILENAME}--*.sql" -type f | wc -l)
if [ "$SQL_FILES_COUNT" -gt 0 ]; then if [ "$SQL_FILES_COUNT" -gt 0 ]; then
find "$EXTDIR" -name "${PROJECT_FILENAME}--*.sql" -type f -exec rm -f {} \; find "$EXTDIR" -name "${PROJECT_FILENAME}--*.sql" -type f -exec rm -f {} \;
echo "Removed: ${SQL_FILES_COUNT} SQL file(s)" echo "Removed: ${SQL_FILES_COUNT} SQL file(s)"