diff options
| author | Jeff Carr <[email protected]> | 2025-10-28 21:59:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-28 21:59:48 -0500 |
| commit | 200b76da8a0dd95b524d44e90a92106a9699d9fd (patch) | |
| tree | fbd9110e1b464278c5b9faa93639fe887494effd /path.go | |
| parent | 05d09b7584b4cd18676c68dd161142044437a7af (diff) | |
Diffstat (limited to 'path.go')
| -rw-r--r-- | path.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,25 +1,24 @@ package env import ( + "fmt" "os" "path/filepath" "strings" - - "go.wit.com/log" ) // adds a path to the ENV func AddPath(newpath string) bool { path := os.Getenv("PATH") for _, p := range strings.Split(path, ":") { - log.Info("Looking at path:", p) + fmt.Println("Looking at path:", p) if p == newpath { - log.Info("FOUND path:", p) + fmt.Println("FOUND path:", p) return false } } path = path + ":" + newpath - log.Info("ADDING PATH:", path) + fmt.Println("ADDING PATH:", path) os.Setenv("PATH", path) return true } |
