diff options
author | Jason Song <i@wolfogre.com> | 2023-03-31 15:08:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 15:08:46 +0200 |
commit | d3dfde055aad9c0e9631fd6bbf06f4b0db706eff (patch) | |
tree | 9af723c10181facf862c98283e3c5700036d5f1f /cmd | |
parent | Make sure working directory is respected when configured from matrix (#1686) (diff) | |
download | forgejo-act-d3dfde055aad9c0e9631fd6bbf06f4b0db706eff.tar.xz forgejo-act-d3dfde055aad9c0e9631fd6bbf06f4b0db706eff.zip |
fix: use os.UserHomeDir (#1706)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/notices.go | 3 | ||||
-rw-r--r-- | cmd/root.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cmd/notices.go b/cmd/notices.go index bd03aa3..9ddcf6f 100644 --- a/cmd/notices.go +++ b/cmd/notices.go @@ -11,7 +11,6 @@ import ( "strings" "time" - "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" ) @@ -136,7 +135,7 @@ func etagPath() string { var xdgCache string var ok bool if xdgCache, ok = os.LookupEnv("XDG_CACHE_HOME"); !ok || xdgCache == "" { - if home, err := homedir.Dir(); err == nil { + if home, err := os.UserHomeDir(); err == nil { xdgCache = filepath.Join(home, ".cache") } else if xdgCache, err = filepath.Abs("."); err != nil { log.Fatal(err) diff --git a/cmd/root.go b/cmd/root.go index 9983a4b..fc3e43e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,7 +15,6 @@ import ( "github.com/adrg/xdg" "github.com/andreaskoch/go-fswatch" "github.com/joho/godotenv" - "github.com/mitchellh/go-homedir" gitignore "github.com/sabhiram/go-gitignore" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -95,7 +94,7 @@ func Execute(ctx context.Context, version string) { } func configLocations() []string { - home, err := homedir.Dir() + home, err := os.UserHomeDir() if err != nil { log.Fatal(err) } |