File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,24 +13,24 @@ import (
13
13
// Get fetches the remaining arguments after CLI parsing and splits them into
14
14
// two groups: the arguments before the double dash (--) and the arguments after
15
15
// the double dash.
16
- func Get () ([]string , [] string , error ) {
16
+ func Get () ([]string , string , error ) {
17
17
args := pflag .Args ()
18
18
doubleDashPos := pflag .CommandLine .ArgsLenAtDash ()
19
19
20
20
if doubleDashPos == - 1 {
21
- return args , nil , nil
21
+ return args , "" , nil
22
22
}
23
23
24
24
var quotedCliArgs []string
25
25
for _ , arg := range args [doubleDashPos :] {
26
26
quotedCliArg , err := syntax .Quote (arg , syntax .LangBash )
27
27
if err != nil {
28
- return nil , nil , err
28
+ return nil , "" , err
29
29
}
30
30
quotedCliArgs = append (quotedCliArgs , quotedCliArg )
31
31
}
32
32
33
- return args [:doubleDashPos ], quotedCliArgs , nil
33
+ return args [:doubleDashPos ], strings . Join ( quotedCliArgs , " " ) , nil
34
34
}
35
35
36
36
// Parse parses command line argument: tasks and global variables
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ func run() error {
76
76
if err != nil {
77
77
return err
78
78
}
79
- _ , args , err := args .Get ()
79
+ args , _ , err := args .Get ()
80
80
if err != nil {
81
81
return err
82
82
}
You can’t perform that action at this time.
0 commit comments