@@ -29,6 +29,7 @@ import (
29
29
"github.com/docker/cli/cli/command"
30
30
"github.com/spf13/cobra"
31
31
32
+ "github.com/docker/compose/v2/internal/tracing"
32
33
"github.com/docker/compose/v2/pkg/api"
33
34
"github.com/docker/compose/v2/pkg/compose"
34
35
)
@@ -50,7 +51,7 @@ type configOptions struct {
50
51
noConsistency bool
51
52
}
52
53
53
- func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string , po ... cli.ProjectOptionsFn ) (* types.Project , error ) {
54
+ func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string , po ... cli.ProjectOptionsFn ) (* types.Project , tracing. Metrics , error ) {
54
55
po = append (po ,
55
56
cli .WithInterpolation (! o .noInterpolate ),
56
57
cli .WithResolvedPaths (! o .noResolvePath ),
@@ -124,7 +125,7 @@ func configCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
124
125
125
126
func runConfig (ctx context.Context , dockerCli command.Cli , backend api.Service , opts configOptions , services []string ) error {
126
127
var content []byte
127
- project , err := opts .ToProject (ctx , dockerCli , services )
128
+ project , _ , err := opts .ToProject (ctx , dockerCli , services )
128
129
if err != nil {
129
130
return err
130
131
}
@@ -154,7 +155,7 @@ func runConfig(ctx context.Context, dockerCli command.Cli, backend api.Service,
154
155
}
155
156
156
157
func runServices (ctx context.Context , dockerCli command.Cli , opts configOptions ) error {
157
- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
158
+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
158
159
if err != nil {
159
160
return err
160
161
}
@@ -166,7 +167,7 @@ func runServices(ctx context.Context, dockerCli command.Cli, opts configOptions)
166
167
}
167
168
168
169
func runVolumes (ctx context.Context , dockerCli command.Cli , opts configOptions ) error {
169
- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
170
+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
170
171
if err != nil {
171
172
return err
172
173
}
@@ -181,7 +182,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
181
182
if opts .hash != "*" {
182
183
services = append (services , strings .Split (opts .hash , "," )... )
183
184
}
184
- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
185
+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
185
186
if err != nil {
186
187
return err
187
188
}
@@ -217,7 +218,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
217
218
218
219
func runProfiles (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
219
220
set := map [string ]struct {}{}
220
- project , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
221
+ project , _ , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
221
222
if err != nil {
222
223
return err
223
224
}
@@ -238,7 +239,7 @@ func runProfiles(ctx context.Context, dockerCli command.Cli, opts configOptions,
238
239
}
239
240
240
241
func runConfigImages (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
241
- project , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
242
+ project , _ , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
242
243
if err != nil {
243
244
return err
244
245
}
0 commit comments