jiri: add pkg lookpath, and make gosh use it
Details:
- Moves lookpath functionality out of v.io/x/lib/envvar, to
a new package named v.io/x/lib/lookpath
- Updates gosh to use this package, using the dirs from the
Shell's PATH variable
Change-Id: I47bc80c527e54710d99c04dce0fbf8518f3a132c
MultiPart: 1/2
diff --git a/profiles/profilescmdline/manager_cmdline.go b/profiles/profilescmdline/manager_cmdline.go
index c329dee..110f9a3 100644
--- a/profiles/profilescmdline/manager_cmdline.go
+++ b/profiles/profilescmdline/manager_cmdline.go
@@ -278,7 +278,7 @@
if err == nil && fi.IsDir() {
env := cmdline.EnvFromOS()
env.Vars["PATH"] = jirix.Env()["PATH"]
- return env.LookPathAll("jiri-profile", map[string]bool{})
+ return env.LookPathPrefix("jiri-profile", map[string]bool{})
}
return []string{}
}