Remove caching

I removed this because it was making tests fail!
This commit is contained in:
Corey Johnson 2019-10-16 16:26:32 -07:00
parent 9e97712956
commit b69dff172c

View file

@ -10,13 +10,7 @@ import (
"strings"
)
var cachedDir string
func Dir() (string, error) {
if cachedDir != "" {
return cachedDir, nil
}
dirCmd := exec.Command("git", "rev-parse", "-q", "--git-dir")
dirCmd.Stderr = nil
output, err := dirCmd.Output()
@ -33,7 +27,6 @@ func Dir() (string, error) {
gitDir = filepath.Clean(gitDir)
}
cachedDir = gitDir
return gitDir, nil
}