Skip to content

Commit 8823d78

Browse files
alexmvtimabbott
authored andcommitted
upgrade-postgresql: Swap order of cleanup steps in trap.
We need to remove the container before removing the volume, otherwise the cleanup will fail because the volume is in use.
1 parent accea23 commit 8823d78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

upgrade-postgresql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ temp_container=$(
5757
--health-interval 10s \
5858
"zulip/zulip-postgresql:$new_version"
5959
)
60-
trap 'docker volume rm --force "$full_new_volume"; docker rm --force "$temp_container"' EXIT
60+
trap 'docker rm --force "$temp_container"; docker volume rm --force "$full_new_volume"' EXIT
6161

6262
# Wait for the new PostgreSQL container to become available
6363
tries=0

0 commit comments

Comments
 (0)