refactor: inline kill_container
This commit is contained in:
1 parent
79d4aec1ec
commit
507f5345c5
1 file changed
+2
-5
@@ -573,10 +573,6 @@ attach() {
|
||||
# functions for interacting with containers
|
||||
######################################################################
|
||||
|
||||
kill_container() {
|
||||
util_op kill-container $1 >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
# Print an error to stderr and return with an indicative exit status
|
||||
# if the container $1 does not exist or isn't running.
|
||||
check_running() {
|
||||
@@ -669,7 +665,8 @@ wait_for_status() {
|
||||
while true ; do
|
||||
"$@" GET /status >/dev/null 2>&1 && return 0
|
||||
if ! check_running $container >/dev/null 2>&1 ; then
|
||||
kill_container $container # stop it restarting
|
||||
# stop it restarting
|
||||
util_op kill-container $container >/dev/null 2>&1 || true
|
||||
echo $(death_msg $container) >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user