aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2017-12-20 06:05:23 +0800
committerJanos Guljas <janos@resenje.org>2017-12-20 06:51:09 +0800
commit820cf09c98706f71d4b02b6c25e62db15830f3fb (patch)
tree99780905fbeb3c5335148df2a1641d94d7e6c33f /cmd
parentdd5ae4fd8e28d1ce618668d213e81781ef59f067 (diff)
downloaddexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar.gz
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar.bz2
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar.lz
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar.xz
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.tar.zst
dexon-820cf09c98706f71d4b02b6c25e62db15830f3fb.zip
cmd/swarm: return error early in buildConfig function
Diffstat (limited to 'cmd')
-rw-r--r--cmd/swarm/config.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go
index 566b00f48..a3c03c00d 100644
--- a/cmd/swarm/config.go
+++ b/cmd/swarm/config.go
@@ -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