Skip to content

Merge and fix Convert function from docker/compose-switch#8985

Merged
ndeloof merged 1 commit intodocker:v2from
ulyssessouza:fix-on-docker-root-flags
Dec 3, 2021
Merged

Merge and fix Convert function from docker/compose-switch#8985
ndeloof merged 1 commit intodocker:v2from
ulyssessouza:fix-on-docker-root-flags

Conversation

@ulyssessouza
Copy link
Copy Markdown
Contributor

What I did
Note that it fixes the problem of double "compose" on calling the compose plugin with "docker" root flags.
Like in "docker --context default compose version"

This also removes the vendoring of the repo

Related issue
Resolves #8945

Comment thread cmd/convert.go Outdated
@ulyssessouza ulyssessouza force-pushed the fix-on-docker-root-flags branch 2 times, most recently from 2f4583f to e670dcb Compare December 2, 2021 10:20
@ulyssessouza ulyssessouza requested a review from ndeloof December 2, 2021 10:33
@ulyssessouza ulyssessouza marked this pull request as ready for review December 2, 2021 10:33
@ndeloof
Copy link
Copy Markdown
Contributor

ndeloof commented Dec 2, 2021

Copy link
Copy Markdown
Contributor

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removal of the compose pre-command breaks standalone usage.

@ulyssessouza
Copy link
Copy Markdown
Contributor Author

@ndeloof Ops... Sorry. My environment was just restarted after the update of DD. I was testing with one thinking it was the other...

@ulyssessouza ulyssessouza force-pushed the fix-on-docker-root-flags branch 2 times, most recently from 6d31e24 to 05a7114 Compare December 2, 2021 11:42
@ulyssessouza
Copy link
Copy Markdown
Contributor Author

@ndeloof PTAL

Copy link
Copy Markdown
Member

@mat007 mat007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should we revert the --compatibility flag from compose-switch after merging this?

Comment thread cmd/convert.go Outdated
@ulyssessouza ulyssessouza force-pushed the fix-on-docker-root-flags branch from 05a7114 to 9d67f34 Compare December 3, 2021 08:28
@mat007
Copy link
Copy Markdown
Member

mat007 commented Dec 3, 2021

So should we revert the --compatibility flag from compose-switch after merging this?

Ah actually that PR doesn’t add that flag here, for some reason I thought it did, based on whether we detected if we’re running standalone or not…

Never mind, ignore me 😬

@ulyssessouza ulyssessouza force-pushed the fix-on-docker-root-flags branch from 9d67f34 to f8b4727 Compare December 3, 2021 09:26
This also removes the vendoring of the repo
Note that it fixes the problem of double "compose" on calling
the compose plugin with "docker" root flags.
Like in "docker --context default compose version"

Signed-off-by: Ulysses Souza <[email protected]>
@ulyssessouza ulyssessouza force-pushed the fix-on-docker-root-flags branch from f8b4727 to 9306f4d Compare December 3, 2021 09:54
Comment thread cmd/convert.go

func convert(args []string) []string {
var rootFlags []string
command := []string{compose.PluginName}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker --context default compose reports unknown docker command: "compose compose" for 2.0.1 but not 2.0.0

3 participants