From 7680b7155d74d26472f9652e98bf961bf381a10a 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 c60f8b3167..9fb1369de8 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{})