Skip to content

Commit

Permalink
fix: don't panic when scan on start fails
Browse files Browse the repository at this point in the history
fixes #399
  • Loading branch information
sentriz committed Oct 31, 2023
1 parent d03d2dc commit 37e826e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/gonic/gonic.go
Expand Up @@ -410,8 +410,10 @@ func main() {

defer logJob("scan at start")()

_, err := scannr.ScanAndClean(scanner.ScanOptions{})
return err
if _, err := scannr.ScanAndClean(scanner.ScanOptions{}); err != nil {
log.Printf("error scanning on start: %v", err)
}
return nil
})

errShutdown := errors.New("shutdown")
Expand Down

0 comments on commit 37e826e

Please sign in to comment.