diff options
author | techknowlogick <matti@mdranta.net> | 2019-06-18 22:14:15 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-19 10:14:15 +0800 |
commit | 33ad5548002156f7fb7779870571600c0a181c85 (patch) | |
tree | 9d4269a2ea00fec152f462ffddffbeffba64ba2f /vendor/github.com/mitchellh | |
parent | b209531959104cb6d5a8079ec567386720f3aaf3 (diff) | |
download | gitea-33ad5548002156f7fb7779870571600c0a181c85.tar.gz gitea-33ad5548002156f7fb7779870571600c0a181c85.zip |
update go-git to v4.12.0 - fixes #7248 (#7249)
Diffstat (limited to 'vendor/github.com/mitchellh')
-rw-r--r-- | vendor/github.com/mitchellh/go-homedir/homedir.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go index fb87bef94f..25378537ea 100644 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ b/vendor/github.com/mitchellh/go-homedir/homedir.go @@ -76,6 +76,16 @@ func Expand(path string) (string, error) { return filepath.Join(dir, path[1:]), nil } +// Reset clears the cache, forcing the next call to Dir to re-detect +// the home directory. This generally never has to be called, but can be +// useful in tests if you're modifying the home directory via the HOME +// env var or something. +func Reset() { + cacheLock.Lock() + defer cacheLock.Unlock() + homedirCache = "" +} + func dirUnix() (string, error) { homeEnv := "HOME" if runtime.GOOS == "plan9" { |