Skip to content

Commit aa0720f

Browse files
authored
Merge pull request docker#10062 from ndeloof/9554
load project from files when explicitly set by user
2 parents 1b1f783 + 8498486 commit aa0720f

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)