Documentation
¶
Overview ¶
Package installmethod works out how the running circleci binary was installed, from where it lives on disk. The result is a fixed category name, never the path itself, so it is safe to report in telemetry.
Index ¶
Constants ¶
const ForceEnv = "__CIRCLE_INSTALL_METHOD"
ForceEnv makes Detect and UpgradeCommand report the named install method instead of working it out from the binary's path. Acceptance tests need it because the binary under test always runs from a temp dir. Internal (double underscore); never user-set.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
func Detect() string
Detect returns how the running binary was installed: one of "homebrew", "snap", "winget", "chocolatey", "deb", "rpm", "docker", "install-script" or "other". It never fails; anything it cannot place is "other".
func UpgradeCommand ¶ added in v1.4.0
func UpgradeCommand() string
UpgradeCommand returns the command that upgrades the running binary the same way it was installed, such as "brew upgrade circleci", or "" when the install method is unknown and there is no command to recommend.
Types ¶
This section is empty.