From 399112fe3684dfba26b34a22f6cab5741281647b Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 9 Mar 2017 23:51:03 +0000 Subject: [PATCH] Actually report errors with moving of creating static index Turns out that cli only exits when the error is created with cli.NewExitError. Signed-off-by: Patrick Uiterwijk --- server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 6aedb036..548f651f 100644 --- a/server/server.go +++ b/server/server.go @@ -111,7 +111,7 @@ func main() { // create the initial index if err := createStaticIndex(r, staticDir, c.GlobalString("clair")); err != nil { - return err + return cli.NewExitError(fmt.Sprintf("Error creating index: %s", err.Error()), 1) } // parse the duration