Przeglądaj źródła

fix: Exit if no base config file is found

jamesread 8 miesięcy temu
rodzic
commit
3967b91cf0
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      service/main.go

+ 5 - 1
service/main.go

@@ -192,8 +192,12 @@ func initConfig(configDir string) {
 
 	cfg = config.DefaultConfigWithBasePort(getBasePort())
 
-	config.AppendSource(cfg, k, baseConfigPath)
+	if baseConfigPath == "" {
+		log.Fatalf("No base config file found")
+		os.Exit(1)
+	}
 
+	config.AppendSource(cfg, k, baseConfigPath)
 }
 
 func initInstallationInfo() {