Documentation
¶
Overview ¶
Package toolresolve provides centralized binary resolution that respects both the system PATH, the well-known extra install paths (e.g. ~/.local/bin, ~/.opencode/bin), and user-configured extra paths from the terminal config.
This package never modifies the process's PATH environment variable. Instead, LookPath dynamically searches the system PATH plus all extra paths. Callers spawning subprocesses should use AppendExtraPaths to build the env for the child process.
Index ¶
- Variables
- func AllExtraPaths() []string
- func AppendExtraPaths(env []string) []string
- func CompareVersions(v1, v2 string) bool
- func ExtractMajorVersion(version string) int
- func GetFullSearchPATH() string
- func IsAvailable(name string) bool
- func LookPath(name string) (string, error)
- func SetUserExtraPaths(paths []string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtraPaths = []string{
"/usr/local/bin",
"/usr/local/go/bin",
}
ExtraPaths are common install directories that may not be in the server process's PATH but where tools are commonly installed.
Functions ¶
func AllExtraPaths ¶
func AllExtraPaths() []string
func AppendExtraPaths ¶
func CompareVersions ¶
func ExtractMajorVersion ¶
func GetFullSearchPATH ¶
func GetFullSearchPATH() string
func IsAvailable ¶
func SetUserExtraPaths ¶
func SetUserExtraPaths(paths []string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.