Skip to content

Commit 7cc801d

Browse files
authored
Merge pull request #6467 from thaJeztah/no_apply
cli/command: NewDockerCli: don't depend on DockerCli.Apply
2 parents 7afda4c + 133279f commit 7cc801d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/command/cli.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,10 @@ func NewDockerCli(ops ...CLIOption) (*DockerCli, error) {
602602
ops = append(defaultOps, ops...)
603603

604604
cli := &DockerCli{baseCtx: context.Background()}
605-
if err := cli.Apply(ops...); err != nil {
606-
return nil, err
605+
for _, op := range ops {
606+
if err := op(cli); err != nil {
607+
return nil, err
608+
}
607609
}
608610
return cli, nil
609611
}

0 commit comments

Comments
 (0)