Skip to content

Commit 2a83d1c

Browse files
committed
prevent panic with empty document
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent f02a580 commit 2a83d1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

loader/loader.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ func load(ctx context.Context, configDetails types.ConfigDetails, opts *Options,
335335
}
336336
}
337337

338+
if model == nil {
339+
return nil, errors.New("empty compose file")
340+
}
341+
338342
project := &types.Project{
339343
Name: opts.projectName,
340344
WorkingDir: configDetails.WorkingDir,

0 commit comments

Comments
 (0)