diff --git a/cmd/root.go b/cmd/root.go index f60c550..ab4f245 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -35,9 +35,7 @@ func Execute() { func init() { cobra.OnInitialize(initConfig) - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.kamanda.yaml)") - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } @@ -51,13 +49,10 @@ func initConfig() { fmt.Println(err) os.Exit(1) } - viper.AddConfigPath(home) - viper.SetConfigName(".kamanda") + viper.SetConfigFile(".kamanda/refresh_token.json") } - viper.AutomaticEnv() - if err := viper.ReadInConfig(); err == nil { fmt.Println("Using config file:", viper.ConfigFileUsed()) }