Fix runtime ops with missing env file

Signed-off-by: Max Proske <max@mproske.com>
This commit is contained in:
Max Proske 2025-08-15 13:39:26 -07:00 committed by Nicolas De loof
parent d3a260e533
commit 19ad737ee7

View File

@ -245,7 +245,7 @@ func (o *ProjectOptions) projectOrName(ctx context.Context, dockerCli command.Cl
name := o.ProjectName
var project *types.Project
if len(o.ConfigPaths) > 0 || o.ProjectName == "" {
p, _, err := o.ToProject(ctx, dockerCli, services, cli.WithDiscardEnvFile)
p, _, err := o.ToProject(ctx, dockerCli, services, cli.WithDiscardEnvFile, cli.WithoutEnvironmentResolution)
if err != nil {
envProjectName := os.Getenv(ComposeProjectName)
if envProjectName != "" {