install

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package install answers one question about the running binary: how it got here, and therefore what would replace it with a newer one.

It exists as its own package because more than one thing needs the answer. `outplane update` runs the command, `outplane update --check` prints it, and anything reporting on the local setup can name the channel. Deciding it in a command handler would mean deciding it again in the next one.

Nothing here installs anything. Detect reports; the caller runs.

Index

Constants

View Source
const (
	// NpmPackage is the wrapper package. The platform binaries it pulls in are
	// @outplane/cli-<os>-<arch>, but nobody installs those directly.
	NpmPackage = "outplane"

	ScriptURL = "https://outplane.com/install.sh"
)

The two supported channels, named once.

Every other mention of them, in help text, in error messages and in the documentation, should read from here. Two copies of an install command is how a release ends up telling half its users to run something that no longer works.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method struct {
	// Name is how a person refers to the channel: "npm", "the install script".
	Name string

	// Path is the resolved location of the running binary. Reported so that a
	// surprising answer can be checked rather than argued with.
	Path string

	// Command is the argv that updates this installation, or nil when this is
	// not an installation the CLI knows how to replace.
	Command []string

	// Display is the same command as a person would type it. It differs from
	// Command for the install script, whose argv wraps a shell pipeline and
	// reads badly when joined.
	Display string

	// Reason explains why Command is nil, in one sentence, and is empty
	// otherwise.
	Reason string
}

Method is how this binary was installed, and what would update it.

func Detect

func Detect() Method

Detect classifies the running binary.

Symlinks are resolved first, and that is not a detail: npm puts a link in the global bin directory pointing into node_modules, so the unresolved path looks like an ordinary /usr/local/bin install and would be updated the wrong way.

func (Method) Managed

func (m Method) Managed() bool

Managed reports whether this CLI knows how to update this installation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL