remove(tools,docker): stderr ignore making it hard to debug
This commit is contained in:
@@ -32,7 +32,7 @@ fi
|
||||
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
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"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
|
||||
exit 1
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ if [ ! -d "$TEST_DIR" ]; then
|
||||
exit 1
|
||||
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 "Ensure the database exists and is accessible" >&2
|
||||
exit 1
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ if [ -f "$CONTROL_FILE" ]; then
|
||||
fi
|
||||
|
||||
# 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
|
||||
find "$EXTDIR" -name "${PROJECT_FILENAME}--*.sql" -type f -exec rm -f {} \;
|
||||
echo "Removed: ${SQL_FILES_COUNT} SQL file(s)"
|
||||
|
||||
Reference in New Issue
Block a user