Skip to content

Commit 665dff4

Browse files
night556JacksonTian
authored andcommitted
solve the command 'aliyun oss help' shows duplicate 'aliyun' at usage
1 parent 91e34e0 commit 665dff4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

oss/lib/cli_bridge.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func NewOssCommand() *cli.Command {
1414
result := &cli.Command{
1515
Name: "oss",
16-
Usage: "aliyun oss [command] [args...] [options...]",
16+
Usage: "oss [command] [args...] [options...]",
1717
Hidden: false,
1818
Short: i18n.T("Object Storage Service", "阿里云OSS对象存储"),
1919
}
@@ -48,7 +48,6 @@ func NewCommandBridge(a Commander) *cli.Command {
4848

4949
config.AddFlags(result.Flags())
5050

51-
5251
for _, s := range cmd.validOptionNames {
5352
opt, ok := OptionMap[s]
5453
if !ok {
@@ -120,8 +119,8 @@ func ParseAndRunCommandFromCli(ctx *cli.Context, args []string) error {
120119
continue
121120
}
122121
if f.IsAssigned() {
123-
a2 = append(a2, "--" + f.Name)
124-
if s2, ok := f.GetValue(); ok && s2 != ""{
122+
a2 = append(a2, "--"+f.Name)
123+
if s2, ok := f.GetValue(); ok && s2 != "" {
125124
a2 = append(a2, s2)
126125
}
127126
}

0 commit comments

Comments
 (0)