Skip to content

Commit

Permalink
don't skip compose used as project name
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Jun 6, 2023
1 parent 629c9f6 commit 60fe974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmd/compatibility/convert.go
Expand Up @@ -62,10 +62,6 @@ func Convert(args []string) []string {
continue
}
if len(arg) > 0 && arg[0] != '-' {
// not a top-level flag anymore, keep the rest of the command unmodified
if arg == compose.PluginName {
i++
}
command = append(command, args[i:]...)
break
}
Expand Down
5 changes: 5 additions & 0 deletions cmd/compatibility/convert_test.go
Expand Up @@ -83,6 +83,11 @@ func Test_convert(t *testing.T) {
args: []string{"--project-directory", "", "ps"},
want: []string{"compose", "--project-directory", "", "ps"},
},
{
name: "compose as project name",
args: []string{"--project-name", "compose", "down", "--remove-orphans"},
want: []string{"compose", "--project-name", "compose", "down", "--remove-orphans"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 60fe974

Please sign in to comment.