Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit f12a4d5

Browse files
Merge pull request #85 from aaron-prindle/fix-validation
fix validation error for empty analyzer
2 parents b83a78c + d0ffdd2 commit f12a4d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,13 @@ func checkArgType(args []string) error {
121121
}
122122

123123
func checkIfValidAnalyzer(flagtypes string) error {
124+
if flagtypes == "" {
125+
return nil
126+
}
124127
analyzers := strings.Split(flagtypes, ",")
125128
for _, name := range analyzers {
126129
if _, exists := differs.Analyzers[name]; !exists {
127-
errMessage := fmt.Sprintf("Argument %s is not an image ID, URL, or tar\n", name)
130+
errMessage := fmt.Sprintf("Argument %s is not a valid analyzer\n", name)
128131
glog.Errorf(errMessage)
129132
return errors.New(errMessage)
130133
}

0 commit comments

Comments
 (0)