Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
fix: update config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Dec 5, 2019
1 parent a3f8a3b commit d1af727
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand All @@ -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())
}
Expand Down

0 comments on commit d1af727

Please sign in to comment.