From 13959a970eda9e4c61afe6105f176c01f9d14ff5 Mon Sep 17 00:00:00 2001 From: "Furukawa, Atsushi" Date: Sun, 17 Dec 2023 00:36:36 +0900 Subject: [PATCH] fix: remove XDG_Base from 1st use --- utils/utils.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/utils/utils.go b/utils/utils.go index a009b46..22cf4d4 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -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 {