From 049d0ffda22e20d86cd95a463e1d74dd4f3eafbc Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 29 May 2019 15:31:22 +0200 Subject: [PATCH] set exito code on error --- cmd/ecload/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/ecload/main.go b/cmd/ecload/main.go index fef4e9b..e991e9b 100644 --- a/cmd/ecload/main.go +++ b/cmd/ecload/main.go @@ -36,8 +36,12 @@ func main() { err := ecload.DownloadBook(*outDir, *size, *id, logger) if err != nil { logger.Error.Println(err) + os.Exit(1) } } - app.Run(os.Args) + err := app.Run(os.Args) + if err != nil { + os.Exit(1) + } }