Skip to content

Commit

Permalink
Update cmd/oras/internal/option/platform.go
Browse files Browse the repository at this point in the history
Co-authored-by: Billy Zha <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
TerryHowe and qweeah committed Sep 30, 2024
1 parent afd6918 commit 47e99c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/oras/internal/option/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ type ArtifactPlatform struct {

// ApplyFlags applies flags to a command flag set.
func (opts *ArtifactPlatform) ApplyFlags(fs *pflag.FlagSet) {
if opts.FlagDescription == "" {
opts.FlagDescription = "artifact platform"
}
fs.StringVarP(&opts.platform, "artifact-platform", "", "", opts.FlagDescription+" in the form of `os[/arch][/variant][:os_version]`")
opts.FlagDescription = "set artifact platform"
opts.Platform.AppFlags(fs)
}

// Parse parses the input platform flag to an oci platform type.
Expand Down

0 comments on commit 47e99c4

Please sign in to comment.