@@ -50,15 +50,16 @@ type configOptions struct {
50
50
noConsistency bool
51
51
}
52
52
53
- func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string ) (* types.Project , error ) {
54
- return o . ProjectOptions . ToProject ( dockerCli , services ,
53
+ func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string , po ... cli. ProjectOptionsFn ) (* types.Project , error ) {
54
+ po = append ( po ,
55
55
cli .WithInterpolation (! o .noInterpolate ),
56
56
cli .WithResolvedPaths (! o .noResolvePath ),
57
57
cli .WithNormalization (! o .noNormalize ),
58
58
cli .WithConsistency (! o .noConsistency ),
59
59
cli .WithDefaultProfiles (o .Profiles ... ),
60
60
cli .WithDiscardEnvFile ,
61
61
cli .WithContext (ctx ))
62
+ return o .ProjectOptions .ToProject (dockerCli , services , po ... )
62
63
}
63
64
64
65
func configCommand (p * ProjectOptions , dockerCli command.Cli , backend api.Service ) * cobra.Command {
@@ -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 )
158
+ project , err := opts .ToProject (ctx , dockerCli , nil , cli . WithoutEnvironmentResolution )
158
159
if err != nil {
159
160
return err
160
161
}
@@ -165,7 +166,7 @@ func runServices(ctx context.Context, dockerCli command.Cli, opts configOptions)
165
166
}
166
167
167
168
func runVolumes (ctx context.Context , dockerCli command.Cli , opts configOptions ) error {
168
- project , err := opts .ToProject (ctx , dockerCli , nil )
169
+ project , err := opts .ToProject (ctx , dockerCli , nil , cli . WithoutEnvironmentResolution )
169
170
if err != nil {
170
171
return err
171
172
}
@@ -180,7 +181,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
180
181
if opts .hash != "*" {
181
182
services = append (services , strings .Split (opts .hash , "," )... )
182
183
}
183
- project , err := opts .ToProject (ctx , dockerCli , nil )
184
+ project , err := opts .ToProject (ctx , dockerCli , nil , cli . WithoutEnvironmentResolution )
184
185
if err != nil {
185
186
return err
186
187
}
@@ -209,7 +210,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
209
210
210
211
func runProfiles (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
211
212
set := map [string ]struct {}{}
212
- project , err := opts .ToProject (ctx , dockerCli , services )
213
+ project , err := opts .ToProject (ctx , dockerCli , services , cli . WithoutEnvironmentResolution )
213
214
if err != nil {
214
215
return err
215
216
}
@@ -230,7 +231,7 @@ func runProfiles(ctx context.Context, dockerCli command.Cli, opts configOptions,
230
231
}
231
232
232
233
func runConfigImages (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
233
- project , err := opts .ToProject (ctx , dockerCli , services )
234
+ project , err := opts .ToProject (ctx , dockerCli , services , cli . WithoutEnvironmentResolution )
234
235
if err != nil {
235
236
return err
236
237
}
0 commit comments