diff options
author | Valery Piashchynski <[email protected]> | 2022-05-30 11:41:41 +0200 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-05-30 11:41:41 +0200 |
commit | 15275fa93683c948f6a13e560e17f14f6c4f9cc4 (patch) | |
tree | 53cda0d193ef50ccc94cea7b635ab96cf96d7a81 /internal | |
parent | 23fffb071812cdb53aeca56a4c3de9770ff34fae (diff) |
properly finish process on error
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/cli/serve/command.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/cli/serve/command.go b/internal/cli/serve/command.go index 70b8b995..99c339dd 100644 --- a/internal/cli/serve/command.go +++ b/internal/cli/serve/command.go @@ -96,12 +96,12 @@ func NewCommand(override *[]string, cfgFile *string, silent *bool) *cobra.Comman for { select { case e := <-errCh: - fmt.Printf("error occurred: %v, plugin: %s, stopping execution\n", e.Error, e.VertexID) + return fmt.Errorf("error: %w\nplugin: %s", e.Error, e.VertexID) case <-stop: // stop the container after first signal fmt.Printf("stop signal received, grace timeout is: %d seconds\n", uint64(containerCfg.GracePeriod.Seconds())) if err = endureContainer.Stop(); err != nil { - fmt.Printf("error occurred during the stopping container: %v\n", err) + return fmt.Errorf("error: %w", err) } return nil |