Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Nov 17, 2022
1 parent 0895ba9 commit 2e45215
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/oras/internal/option/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Target struct {
var defaultConfig = map[string]string{
"type": "remote",
"path": "",
"tarball": "true",
"tarball": "false",
}

// ApplyFlags applies flags to a command flag set.
Expand All @@ -83,9 +83,7 @@ func (opts *Target) ApplyFlagsWithPrefix(fs *pflag.FlagSet, prefix, description
}

fs.StringToStringVarP(&opts.config, flagPrefix+"target", "", defaultConfig, "configure target configuration"+noteSuffix)
if opts.Type == RemoteType {
opts.Remote.ApplyFlagsWithPrefix(fs, prefix, description)
}
opts.Remote.ApplyFlagsWithPrefix(fs, prefix, description)
}

func (opts *Target) ParseFlags() error {
Expand Down

0 comments on commit 2e45215

Please sign in to comment.