config: don't fail LoadConfig if file doesn't exist
When the config file doesn't exist, don't return because we need to keep the default and also load from env.
This commit is contained in:
parent
2aedd3da05
commit
8393cfc322
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ func GetDefaultConfig() *ComposerConfigFile {
|
|||
func LoadConfig(name string) (*ComposerConfigFile, error) {
|
||||
c := GetDefaultConfig()
|
||||
_, err := toml.DecodeFile(name, c)
|
||||
if err != nil {
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
err = loadConfigFromEnv(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue