Skip to content

Commit

Permalink
Revert "Merge pull request docker#9745 from ulyssessouza/apply-newly-…
Browse files Browse the repository at this point in the history
…loaded-envvars"

This reverts commit 6fe34c4, reversing
changes made to 10cfd55.

Signed-off-by: Milas Bowman <[email protected]>
  • Loading branch information
milas committed Aug 26, 2022
1 parent 8840649 commit 3460d02
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions cmd/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import (
dockercli "github.com/docker/cli/cli"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/flags"
"github.com/docker/docker/client"
"github.com/morikuni/aec"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -293,18 +291,6 @@ func RootCommand(dockerCli command.Cli, backend api.Service) *cobra.Command {
if err != nil {
return err
}

// Reset DockerCli and APIClient to get possible `DOCKER_HOST` and/or `DOCKER_CONTEXT` loaded from environment file.
err = dockerCli.Apply(func(cli *command.DockerCli) error {
return cli.Initialize(flags.NewClientOptions(),
command.WithInitializeClient(func(_ *command.DockerCli) (client.APIClient, error) {
return nil, nil
}))
})
if err != nil {
return err
}

parent := cmd.Root()
if parent != nil {
parentPrerun := parent.PersistentPreRunE
Expand Down

0 comments on commit 3460d02

Please sign in to comment.