Skip to content

Commit

Permalink
fix: Fix default behavior and add dev version.
Browse files Browse the repository at this point in the history
  • Loading branch information
GSMLG-BOT committed Apr 18, 2024
1 parent 8eb60cf commit c57aa72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const defualtFname = ".config/gsmlg/cli.yaml"

var (
cfgFile string
Version string
Version string = "dev"
)

var exitIfError = errorhandler.CreateExitIfError("GSMLG CLI Error")
Expand All @@ -48,6 +48,7 @@ var rootCmd = &cobra.Command{
fmt.Printf("Version: %s\n", Version)
os.Exit(0)
}
cmd.Help()
},
}

Expand Down Expand Up @@ -103,9 +104,9 @@ func initConfig() {
viper.AutomaticEnv() // read in environment variables that match

// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
// fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
}
// if err := viper.ReadInConfig(); err == nil {
// fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
// }
}

func writeConfig() {
Expand Down

0 comments on commit c57aa72

Please sign in to comment.