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 {
43
43
}
44
44
}
45
45
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
-
55
46
// Convert transforms standalone docker-compose args into CLI plugin compliant ones
56
47
func Convert (args []string ) []string {
57
48
var rootFlags []string
@@ -67,9 +58,18 @@ func Convert(args []string) []string {
67
58
command = append (command , args [i :]... )
68
59
break
69
60
}
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"
72
71
}
72
+
73
73
if contains (getBoolFlags (), arg ) {
74
74
rootFlags = append (rootFlags , arg )
75
75
continue
You can’t perform that action at this time.
0 commit comments