Skip to content

Commit

Permalink
feat: try to read config from ~/.config/gdu/gdu.yaml first
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Sep 19, 2022
1 parent d7e9ef3 commit fab0335
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/gdu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ func setDefaultConfigFilePath() {
configErr = err
return
}

path := filepath.Join(home, ".config", "gdu", "gdu.yaml")
if _, err := os.Stat(path); err == nil {
af.CfgFile = path
return
}

af.CfgFile = filepath.Join(home, ".gdu.yaml")
}

Expand Down

0 comments on commit fab0335

Please sign in to comment.