summaryrefslogtreecommitdiff
path: root/unix.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-03-09 22:03:18 -0600
committerJeff Carr <[email protected]>2024-03-09 22:03:18 -0600
commit804acc169a49320a5f9a0efb60847071f7fee7f2 (patch)
tree72b04fb16565f1cd42d0636452ec1b8f068bb259 /unix.go
parent2622e90b1f48f49f007222a1d3b696fd06fb0ca5 (diff)
fix logic for go.work setups
Diffstat (limited to 'unix.go')
-rw-r--r--unix.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/unix.go b/unix.go
index a3b1647..1929d24 100644
--- a/unix.go
+++ b/unix.go
@@ -6,7 +6,6 @@ import (
"io/ioutil"
"os"
"os/exec"
- "os/user"
"path/filepath"
"regexp"
"strconv"
@@ -222,12 +221,7 @@ func IsDirectory(path string) bool {
}
func (rs *RepoStatus) Exists(filename string) bool {
- usr, err := user.Current()
- if err != nil {
- log.Error(err, "Exists() error: could not determine what your username is")
- return false
- }
- testf := filepath.Join(usr.HomeDir, "go/src/", rs.String(), filename)
+ testf := filepath.Join(rs.Path(), filename)
if Exists(testf) {
return true
}