Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cli/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"regexp"
"strings"

"github.com/compose-spec/compose-go/errdefs"
"github.com/compose-spec/compose-go/loader"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/godotenv"
Expand Down Expand Up @@ -131,7 +130,8 @@ func WithDefaultConfigPath(o *ProjectOptions) error {
}
parent := filepath.Dir(pwd)
if parent == pwd {
return errors.Wrap(errdefs.ErrNotFound, "can't find a suitable configuration file in this directory or any parent")
// no config file found, but that's not a blocker if caller only needs project name
return nil
}
pwd = parent
}
Expand Down Expand Up @@ -364,7 +364,6 @@ func getConfigPathsFromOptions(options *ProjectOptions) ([]string, error) {
if len(options.ConfigPaths) != 0 {
return absolutePaths(options.ConfigPaths)
}

return nil, errors.New("no configuration file provided")
}

Expand Down