From 4b98e436ef0da2bf742caaf8bae917da3960c65b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 5 Jun 2020 20:13:03 +0300 Subject: [PATCH] app/vmauth: emit fatal errors instead of panics when incorrect command-line flags are set --- app/vmauth/auth_config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmauth/auth_config.go b/app/vmauth/auth_config.go index c60f8b316..9fb1369de 100644 --- a/app/vmauth/auth_config.go +++ b/app/vmauth/auth_config.go @@ -36,11 +36,11 @@ type UserInfo struct { func initAuthConfig() { if len(*authConfigPath) == 0 { - logger.Panicf("FATAL: missing required `-auth.config` command-line flag") + logger.Fatalf("missing required `-auth.config` command-line flag") } m, err := readAuthConfig(*authConfigPath) if err != nil { - logger.Panicf("FATAL: cannot load auth config from `-auth.config=%s`: %s", *authConfigPath, err) + logger.Fatalf("cannot load auth config from `-auth.config=%s`: %s", *authConfigPath, err) } authConfig.Store(m) stopCh = make(chan struct{})