Skip to content

Commit dc8074b

Browse files
authored
Merge pull request #457 from ndeloof/empty-doc
prevent panic with empty document
2 parents f02a580 + 2a83d1c commit dc8074b

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)