We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea07ba8 commit f38f3f7Copy full SHA for f38f3f7
1 file changed
cmd/compose/compose.go
@@ -383,11 +383,18 @@ func (o *ProjectOptions) remoteLoaders(dockerCli command.Cli) []loader.ResourceL
383
}
384
385
func (o *ProjectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) (*cli.ProjectOptions, error) {
386
+ pwd, err := os.Getwd()
387
+ if err != nil {
388
+ return nil, err
389
+ }
390
+
391
return cli.NewProjectOptions(o.ConfigPaths,
392
append(po,
393
cli.WithWorkingDirectory(o.ProjectDir),
394
// First apply os.Environment, always win
395
cli.WithOsEnv,
396
+ // set PWD as this variable is not consistently supported on Windows
397
+ cli.WithEnv([]string{"PWD=" + pwd}),
398
// Load PWD/.env if present and no explicit --env-file has been set
399
cli.WithEnvFiles(o.EnvFiles...),
400
// read dot env file to populate project environment
0 commit comments