From 3821ed29fd4d0dd9fda4447dab444baf40d5cd6b Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 9 May 2022 15:05:53 +0200 Subject: [PATCH] refactor(docker): simplified loop expression --- src/build/build.v | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/build/build.v b/src/build/build.v index 774591d6..0a978aa0 100644 --- a/src/build/build.v +++ b/src/build/build.v @@ -118,11 +118,7 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &db mut data := docker.inspect_container(id) ? // This loop waits until the container has stopped, so we can remove it after - for { - if !data.state.running { - break - } - + for data.state.running { time.sleep(1 * time.second) data = docker.inspect_container(id) ?