We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b952d38 commit a87e198Copy full SHA for a87e198
cmd/grype/cli/commands/db_check.go
@@ -2,6 +2,7 @@ package commands
2
3
import (
4
"fmt"
5
+ "os"
6
7
"github.com/spf13/cobra"
8
@@ -11,6 +12,10 @@ import (
11
12
"github.com/anchore/grype/internal/bus"
13
)
14
15
+const (
16
+ exitCodeOnDBUpgradeAvailable = 100
17
+)
18
+
19
func DBCheck(app clio.Application) *cobra.Command {
20
opts := dbOptionsDefault(app.ID())
21
@@ -51,5 +56,7 @@ func runDBCheck(opts options.Database) error {
51
56
fmt.Printf("Updated DB URL: %s\n", updateDBEntry.URL.String())
52
57
fmt.Println("You can run 'grype db update' to update to the latest db")
53
58
59
+ os.Exit(exitCodeOnDBUpgradeAvailable) //nolint:gocritic
60
54
61
return nil
55
62
}
0 commit comments