Documentation
¶
Overview ¶
Package hostbin resolves host binaries that live outside the PATH a daemon inherits. lerd-ui and lerd-watcher are started by launchd (or systemd), which hands them a minimal PATH — on macOS literally /usr/bin:/bin:/usr/sbin:/sbin — so a tool the user installed with Homebrew is invisible to exec.LookPath even though it works fine in their terminal. Anything a daemon may have to run goes through here so the CLI and the daemons resolve the same binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExtraDirs = func() []string { if runtime.GOOS == "darwin" { return []string{"/opt/homebrew/bin", "/usr/local/bin"} } return []string{"/usr/local/bin", "/snap/bin", "/home/linuxbrew/.linuxbrew/bin"} }
ExtraDirs lists the install prefixes a daemon's PATH leaves out: both Homebrew prefixes on macOS (Apple Silicon and Intel), and the equivalents on Linux. Ordered the way a login shell would see them. A var so tests can point it at a fixture instead of depending on what the host has installed.
Functions ¶
Types ¶
This section is empty.