diff --git a/internal/actions/update.go b/internal/actions/update.go index 31ceafe9..1694c59e 100644 --- a/internal/actions/update.go +++ b/internal/actions/update.go @@ -74,9 +74,13 @@ func stopStaleContainer(container container.Container, client container.Client, return } if params.LifecycleHooks { - lifecycle.ExecutePreUpdateCommand(client, container) + if err := lifecycle.ExecutePreUpdateCommand(client, container); err != nil { + log.Error(err) + log.Info("Skipping container as the pre-update command failed") + return + } } - + if err := client.StopContainer(container, params.Timeout); err != nil { log.Error(err) } @@ -139,4 +143,4 @@ func checkDependencies(containers []container.Container) { } } } -} \ No newline at end of file +}