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 (
1313// Get fetches the remaining arguments after CLI parsing and splits them into
1414// two groups: the arguments before the double dash (--) and the arguments after
1515// the double dash.
16- func Get () ([]string , [] string , error ) {
16+ func Get () ([]string , string , error ) {
1717 args := pflag .Args ()
1818 doubleDashPos := pflag .CommandLine .ArgsLenAtDash ()
1919
2020 if doubleDashPos == - 1 {
21- return args , nil , nil
21+ return args , "" , nil
2222 }
2323
2424 var quotedCliArgs []string
2525 for _ , arg := range args [doubleDashPos :] {
2626 quotedCliArg , err := syntax .Quote (arg , syntax .LangBash )
2727 if err != nil {
28- return nil , nil , err
28+ return nil , "" , err
2929 }
3030 quotedCliArgs = append (quotedCliArgs , quotedCliArg )
3131 }
3232
33- return args [:doubleDashPos ], quotedCliArgs , nil
33+ return args [:doubleDashPos ], strings . Join ( quotedCliArgs , " " ) , nil
3434}
3535
3636// 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 {
7676 if err != nil {
7777 return err
7878 }
79- _ , args , err := args .Get ()
79+ args , _ , err := args .Get ()
8080 if err != nil {
8181 return err
8282 }
You can’t perform that action at this time.
0 commit comments