Skip to content

Commit 8498486

Browse files
ndeloofglours
authored andcommitted
load project from explicit --files when set
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 1b1f783 commit 8498486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/compose/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func (o *projectOptions) addProjectFlags(f *pflag.FlagSet) {
140140
func (o *projectOptions) projectOrName(services ...string) (*types.Project, string, error) {
141141
name := o.ProjectName
142142
var project *types.Project
143-
if o.ProjectName == "" {
143+
if len(o.ConfigPaths) > 0 || o.ProjectName == "" {
144144
p, err := o.toProject(services)
145145
if err != nil {
146146
envProjectName := os.Getenv("COMPOSE_PROJECT_NAME")

0 commit comments

Comments
 (0)