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 <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-03-09 23:51:03 +00:00
parent 94d0af58c1
commit 399112fe36
No known key found for this signature in database
GPG key ID: 8657980D9AB51E50

View file

@ -111,7 +111,7 @@ func main() {
// create the initial index // create the initial index
if err := createStaticIndex(r, staticDir, c.GlobalString("clair")); err != nil { 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 // parse the duration