Skip to content

Commit b291ead

Browse files
committed
Fix loading config from default paths after merging #199.
This regression was introduced by #199. cfgFiles does point to a slice, but it was not checked if the slice was empty or not. Therefore, no configuration file was read if the -c parameter was not used. Closes chirpstack/chirpstack-docker#74 and chirpstack/chirpstack-docker#75.
1 parent d411d3b commit b291ead

File tree

1 file changed

+1
-1
lines changed
  • cmd/chirpstack-gateway-bridge/cmd

1 file changed

+1
-1
lines changed

cmd/chirpstack-gateway-bridge/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func Execute(v string) {
9090
}
9191

9292
func initConfig() {
93-
if cfgFiles != nil {
93+
if cfgFiles != nil && len(*cfgFiles) != 0 {
9494
var filesMerged []byte
9595
for _, cfgFile := range *cfgFiles {
9696
cfgFileContent, err := ioutil.ReadFile(cfgFile)

0 commit comments

Comments
 (0)