Merge pull request #6467 from thaJeztah/no_apply
cli/command: NewDockerCli: don't depend on DockerCli.Apply
This commit is contained in:
@ -602,8 +602,10 @@ func NewDockerCli(ops ...CLIOption) (*DockerCli, error) {
|
||||
ops = append(defaultOps, ops...)
|
||||
|
||||
cli := &DockerCli{baseCtx: context.Background()}
|
||||
if err := cli.Apply(ops...); err != nil {
|
||||
return nil, err
|
||||
for _, op := range ops {
|
||||
if err := op(cli); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return cli, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user