Skip to content

Commit

Permalink
Skip rhel9 binary not found error for older releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ardaguclu committed Jan 8, 2024
1 parent 10b06af commit 06d1321
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cli/admin/release/extract_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,13 @@ func (o *ExtractOptions) extractCommand(command string) error {
if target.NewArch {
continue
}
if command == "" && (strings.Contains(target.Mapping.From, "rhel9") || strings.Contains(target.Mapping.From, "rhel8")) {
// if user explicitly wants to extract oc.rhel9(or installer.rhel9) via --command=oc.rhel9 and
// if release does not have this binary, we can safely return error.
// On the other hand, if user wants to extract all the tooling in older versions via --tools flag,
// we shouldn't print any error indicating that oc.rhel9 does not exist in this release payload.
continue
}
missing = append(missing, target.Mapping.From)
}
sort.Strings(missing)
Expand Down

0 comments on commit 06d1321

Please sign in to comment.