Skip to content

Commit ed63ed7

Browse files
committed
chore: more fix
1 parent d3a63c2 commit ed63ed7

File tree

1 file changed

+5
-5
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+5
-5
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ function apply_auth_scheme_updates {
170170

171171
function start_vacuum_analyze {
172172
echo "complete" > /tmp/pg-upgrade-status
173-
if ! command -v nix &> /dev/null; then
174-
su -c 'vacuumdb --all --analyze-in-stages' -s "$SHELL" postgres
175-
else
173+
174+
# shellcheck disable=SC1091
175+
if [ -f "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]; then
176176
# shellcheck disable=SC1091
177-
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
178-
vacuumdb --all --analyze-in-stages -U supabase_admin -h localhost -p 5432
177+
source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
179178
fi
179+
vacuumdb --all --analyze-in-stages -U supabase_admin -h localhost -p 5432
180180
echo "Upgrade job completed"
181181
}
182182

0 commit comments

Comments
 (0)