cmd/swarm: return error early in buildConfig function

This commit is contained in:
Janos Guljas 2017-12-19 23:05:23 +01:00
parent dd5ae4fd8e
commit 820cf09c98
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ func buildConfig(ctx *cli.Context) (config *bzzapi.Config, err error) {
config = bzzapi.NewDefaultConfig()
//first load settings from config file (if provided)
config, err = configFileOverride(config, ctx)
if err != nil {
return nil, err
}
//override settings provided by environment variables
config = envVarsOverride(config)
//override settings provided by command line