mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Do not load the config for CLI mockoidc (and version)
This commit is contained in:
parent
a3f18f248c
commit
b3a53bf642
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ import (
|
||||||
var cfgFile string = ""
|
var cfgFile string = ""
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
if len(os.Args) > 1 && os.Args[1] == "version" || os.Args[1] == "mockoidc" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
cobra.OnInitialize(initConfig)
|
cobra.OnInitialize(initConfig)
|
||||||
rootCmd.PersistentFlags().
|
rootCmd.PersistentFlags().
|
||||||
StringVarP(&cfgFile, "config", "c", "", "config file (default is /etc/headscale/config.yaml)")
|
StringVarP(&cfgFile, "config", "c", "", "config file (default is /etc/headscale/config.yaml)")
|
||||||
|
|
Loading…
Reference in a new issue