Skip to content

Commit dee3a3e

Browse files
night556JacksonTian
authored andcommitted
support oss log
1 parent f364241 commit dee3a3e

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### Master
44

5+
- update: support oss log
6+
57
### 3.0.32
68

79
- update: meta data

oss/lib/cli_bridge.go

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package lib
33
import (
44
"fmt"
55
"os"
6-
"strings"
7-
"time"
86

97
"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
108
"github.com/aliyun/aliyun-cli/cli"
@@ -124,11 +122,6 @@ func ParseAndRunCommandFromCli(ctx *cli.Context, args []string) error {
124122
// configs[OptionLanguage] = "EN"
125123
//}
126124

127-
ts := time.Now().UnixNano()
128-
commandLine = strings.Join(os.Args[1:], " ")
129-
// os.Args = []string {"aliyun", "oss", "ls"}
130-
131-
clearEnv()
132125
a2 := []string{"aliyun", "oss"}
133126
a2 = append(a2, ctx.Command().Name)
134127
for _, a := range args {
@@ -155,28 +148,9 @@ func ParseAndRunCommandFromCli(ctx *cli.Context, args []string) error {
155148
a2 = append(a2, v)
156149
}
157150
}
151+
os.Args = a2[1:]
152+
return ParseAndRunCommand()
158153

159-
os.Args = a2
160-
// cli.Noticef("%v", os.Args)
161-
162-
args, options, err := ParseArgOptions()
163-
if err != nil {
164-
return err
165-
}
166-
167-
args = args[1:]
168-
// fmt.Printf("%v", args)
169-
showElapse, err := RunCommand(args, options)
170-
if err != nil {
171-
return err
172-
}
173-
174-
if showElapse {
175-
te := time.Now().UnixNano()
176-
fmt.Printf("%.6f(s) elapsed\n", float64(te-ts)/1e9)
177-
return nil
178-
}
179-
return nil
180154
}
181155

182156
func getSessionCredential(profile *config.Profile) (string, string, string, error) {

0 commit comments

Comments
 (0)