selfcmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

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 Run

func Run(cx *clienv.Cmd, c *spec.Command, cmd *cobra.Command, args []string) error

Run dispatches the `self …` builtins.

func StdinConfirmer

func StdinConfirmer(w io.Writer) clienv.Confirm

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.

Jump to

Keyboard shortcuts

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