More work on porting diff kitten

This commit is contained in:
Kovid Goyal
2023-03-16 21:46:00 +05:30
parent d208670172
commit 3c550bcd28
6 changed files with 172 additions and 19 deletions

View File

@@ -47,3 +47,15 @@ func Which(cmd string, paths ...string) string {
}
return ""
}
func FindExe(name string) string {
ans := Which(name)
if ans != "" {
return ans
}
ans = Which(name, DefaultExeSearchPaths()...)
if ans == "" {
ans = name
}
return ans
}