Skip to content

Commit

Permalink
validate arch
Browse files Browse the repository at this point in the history
  • Loading branch information
brycekahle committed Apr 4, 2024
1 parent cf89139 commit 1d4a90f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/btfhub/commands/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func processArgs(defDistros []string, defReleases map[string][]string) (distros
// Architectures
archs = possibleArchs
if archArg != "" {
if !slices.Contains(possibleArchs, archArg) {
err = fmt.Errorf("invalid arch %s", archArg)
return
}
archs = []string{archArg}
}
return
Expand Down

0 comments on commit 1d4a90f

Please sign in to comment.