mirror of
https://github.com/docker/compose.git
synced 2026-05-13 13:58:02 +00:00
Tolerate missing env file on runtime commands
Signed-off-by: Max Proske <max@mproske.com>
This commit is contained in:
parent
a97738de7d
commit
3a8ff9c7b2
2 changed files with 2 additions and 1 deletions
|
|
@ -280,7 +280,7 @@ func (o *ProjectOptions) toProjectName(ctx context.Context, dockerCli command.Cl
|
|||
return "", err
|
||||
}
|
||||
|
||||
project, _, err := o.ToProject(ctx, dockerCli, backend, nil)
|
||||
project, _, err := o.ToProject(ctx, dockerCli, backend, nil, cli.WithDiscardEnvFile, cli.WithoutEnvironmentResolution)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ func TestUnusedMissingEnvFile(t *testing.T) {
|
|||
c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "ps")
|
||||
c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "logs")
|
||||
c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "down")
|
||||
c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "exec", "serviceA", "echo", "hello")
|
||||
}
|
||||
|
||||
func TestRunEnvFile(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue