Merge pull request #6467 from thaJeztah/no_apply

cli/command: NewDockerCli: don't depend on DockerCli.Apply
This commit is contained in:
Paweł Gronowski
2025-09-24 13:17:51 +02:00
committed by GitHub

View File

@ -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
}