1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-10-17 20:05:55 +02:00

Do not load the config for CLI mockoidc (and version)

This commit is contained in:
Juan Font 2022-09-20 19:59:22 +00:00
parent a3f18f248c
commit b3a53bf642

View File

@ -15,6 +15,10 @@ import (
var cfgFile string = ""
func init() {
if len(os.Args) > 1 && os.Args[1] == "version" || os.Args[1] == "mockoidc" {
return
}
cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().
StringVarP(&cfgFile, "config", "c", "", "config file (default is /etc/headscale/config.yaml)")