Skip to content

Commit

Permalink
fix: remove XDG_Base from 1st use
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushifx committed Dec 16, 2023
1 parent 1c535f5 commit 13959a9
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ import (
)

func RepoDir() string {
xdgCacheDir := os.Getenv("XDG_CACHE_HOME")
if len(xdgCacheDir) > 0 {
return filepath.Join(xdgCacheDir, "gibo", "gitignore-boilerplates")
} else {
cacheDir, err := os.UserCacheDir()
if err != nil {
log.Fatalln("gibo can't determine your user cache directory. Please file an issue at https://github.com/simonwhitaker/gibo/issues")

}
return filepath.Join(cacheDir, "gibo", "gitignore-boilerplates")
cacheDir, err := os.UserCacheDir()
if err != nil {
log.Fatalln("gibo can't determine your user cache directory. Please file an issue at https://github.com/simonwhitaker/gibo/issues")
}
return filepath.Join(cacheDir, "gibo", "gitignore-boilerplates")
}

func cloneRepo(repo string) error {
Expand Down

0 comments on commit 13959a9

Please sign in to comment.