Documentation
¶
Overview ¶
Package selfcmd implements the `self install|update|uninstall|doctor` builtins: the CLI-facing layer over internal/selfupdate. It builds a selfupdate.Config from the invocation environment (the shared HTTP client, clock, program environment, and — for install — a /dev/tty PATH confirm), dispatches, and renders the result structs; all file/network mechanics live in internal/selfupdate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StdinConfirmer ¶
StdinConfirmer returns a clienv.Confirm backed by the process stdin, or nil when stdin is not a terminal. Unlike the install prompt it does NOT use /dev/tty: `self uninstall` is invoked directly (never piped like the install script), so its stdin IS the terminal — and reading stdin also works on Windows, where /dev/tty does not exist. A nil return is how the caller detects "not interactive" and refuses to run. Questions are written to w (stderr).
Types ¶
This section is empty.