mirror of
https://github.com/docker/compose.git
synced 2025-07-26 07:04:32 +02:00
PWD
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
ea07ba8e2a
commit
f38f3f754c
@ -383,11 +383,18 @@ func (o *ProjectOptions) remoteLoaders(dockerCli command.Cli) []loader.ResourceL
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *ProjectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) (*cli.ProjectOptions, error) {
|
func (o *ProjectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) (*cli.ProjectOptions, error) {
|
||||||
|
pwd, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return cli.NewProjectOptions(o.ConfigPaths,
|
return cli.NewProjectOptions(o.ConfigPaths,
|
||||||
append(po,
|
append(po,
|
||||||
cli.WithWorkingDirectory(o.ProjectDir),
|
cli.WithWorkingDirectory(o.ProjectDir),
|
||||||
// First apply os.Environment, always win
|
// First apply os.Environment, always win
|
||||||
cli.WithOsEnv,
|
cli.WithOsEnv,
|
||||||
|
// set PWD as this variable is not consistently supported on Windows
|
||||||
|
cli.WithEnv([]string{"PWD=" + pwd}),
|
||||||
// Load PWD/.env if present and no explicit --env-file has been set
|
// Load PWD/.env if present and no explicit --env-file has been set
|
||||||
cli.WithEnvFiles(o.EnvFiles...),
|
cli.WithEnvFiles(o.EnvFiles...),
|
||||||
// read dot env file to populate project environment
|
// read dot env file to populate project environment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user