update

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSelfUpdateDisabled = errors.New(`self-update is disabled in this build.

This is the Blakeolson21/no-slop fork, which carries local document-guard
patches that exist in no published release. Updating would download a release
archive and overwrite this binary in place, silently dropping every patch.

To move this build forward, rebuild from a checkout of
github.com/Blakeolson21/no-slop:

    go build -o ~/.no-mistakes/bin/no-slop.new ./cmd/no-slop
    mv ~/.no-mistakes/bin/no-slop.new ~/.no-mistakes/bin/no-slop
    no-slop daemon restart

Target the real binary, not the symlink command -v reports: go build -o leaves
a symlink in place and truncates its target, which fails with ETXTBSY on Linux
while the daemon is executing that file. Staging beside the destination keeps
the move an atomic rename instead of a cross-filesystem copy from /tmp.

The install directory comes from NS_INSTALL_DIR and defaults to
~/.no-mistakes/bin; NS_HOME does not affect it. A go install layout puts the
binary in GOBIN instead.`)

ErrSelfUpdateDisabled is returned by Run in place of performing an update. See the repoName comment for why this build has no release channel.

Functions

func CachedLatestVersion

func CachedLatestVersion() string

func MaybeHandleBackgroundCheck

func MaybeHandleBackgroundCheck(args []string) (bool, error)

func MaybeNotifyAndCheck

func MaybeNotifyAndCheck(args []string, stderr io.Writer) error

func Run

func Run(ctx context.Context, stdout, stderr io.Writer, opts RunOptions) error

func ValidateEnv

func ValidateEnv() error

Types

type RunOptions

type RunOptions struct {
	Beta  bool
	Yes   bool
	Force bool
	Stdin io.Reader
}

Jump to

Keyboard shortcuts

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