Skip to content

Commit

Permalink
feat(config): unify cache directory to save in $HOME/.ormb (#177)
Browse files Browse the repository at this point in the history
Signed-off-by: 屈骏 <[email protected]>
  • Loading branch information
DanielQujun authored Apr 1, 2021
1 parent f759e68 commit 980a506
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/ormb/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ func initConfig() {
viper.AddConfigPath(ormbHome)

viper.SetConfigName("config")
rootPath, err := filepath.Abs(viper.GetString("rootPath"))
if err != nil {
logrus.WithField("error", err).Panicln("Failed to get `rootPath` env")
}
rootPath := viper.GetString("rootPath")

if rootPath == "" {
viper.SetDefault("rootPath", ormbHome)
}
Expand Down

0 comments on commit 980a506

Please sign in to comment.