Skip to content

Commit

Permalink
Do not load the config for CLI mockoidc (and version)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Font committed Sep 20, 2022
1 parent a3f18f2 commit b3a53bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/headscale/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down

0 comments on commit b3a53bf

Please sign in to comment.