File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,6 @@ func getStringFlags() []string {
4343 }
4444}
4545
46- var argToActualArgument = map [string ]string {
47- "--verbose" : "--debug" ,
48- // docker cli has deprecated -h to avoid ambiguity with -H, while docker-compose still support it
49- "-h" : "--help" ,
50- // redirect --version pseudo-command to actual command
51- "--version" : "version" ,
52- "-v" : "version" ,
53- }
54-
5546// Convert transforms standalone docker-compose args into CLI plugin compliant ones
5647func Convert (args []string ) []string {
5748 var rootFlags []string
@@ -67,9 +58,18 @@ func Convert(args []string) []string {
6758 command = append (command , args [i :]... )
6859 break
6960 }
70- if actualArgument , ok := argToActualArgument [arg ]; ok {
71- arg = actualArgument
61+
62+ switch arg {
63+ case "--verbose" :
64+ arg = "--debug"
65+ case "-h" :
66+ // docker cli has deprecated -h to avoid ambiguity with -H, while docker-compose still support it
67+ arg = "--help"
68+ case "--version" , "-v" :
69+ // redirect --version pseudo-command to actual command
70+ arg = "version"
7271 }
72+
7373 if contains (getBoolFlags (), arg ) {
7474 rootFlags = append (rootFlags , arg )
7575 continue
You can’t perform that action at this time.
0 commit comments