Skip to content

Commit 84e8c04

Browse files
committed
chore: rm dup cleanup
1 parent 0f31d4e commit 84e8c04

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

flake.nix

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,6 @@
616616
basePackages.start-server
617617
];
618618
} ''
619-
cleanup() {
620-
echo "Cleaning up..."
621-
@OVERMIND@ quit || true
622-
exit $1
623-
}
624-
625-
trap 'cleanup 1' ERR
626619
set -e
627620
628621
export KEY_FILE="${getkeyScript}"
@@ -636,14 +629,14 @@
636629
sleep 1
637630
if [ $i -eq 60 ]; then
638631
echo "PostgreSQL failed to start"
639-
cleanup 1
632+
exit 1
640633
fi
641634
done
642635
643636
644637
if ! psql -p 5435 -h localhost --no-password --username=supabase_admin -d postgres -v ON_ERROR_STOP=1 -Xaf ${./nix/tests/prime.sql}; then
645638
echo "Error executing SQL file"
646-
cleanup 1
639+
exit 1
647640
fi
648641
649642
mkdir -p $out/regression_output
@@ -657,14 +650,14 @@
657650
--user=supabase_admin \
658651
$(ls ${./nix/tests/sql} | sed -e 's/\..*$//' | sort ); then
659652
echo "pg_regress tests failed"
660-
cleanup 1
653+
exit 1
661654
fi
662655
663656
# Copy logs to output
664657
for logfile in $(find /tmp -name postgresql.log -type f); do
665658
cp "$logfile" $out/postgresql.log
666659
done
667-
cleanup 0
660+
exit 0
668661
'';
669662
in
670663
rec {

0 commit comments

Comments
 (0)