desktop

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package desktop provides functionality for detecting and validating the ToolHive Desktop application's CLI management.

Index

Constants

This section is empty.

Variables

View Source
var ErrDesktopConflict = errors.New("CLI conflict detected")

ErrDesktopConflict is returned when a conflict is detected between the current CLI and the desktop-managed CLI.

Functions

func IsDesktopManagedCLI added in v0.11.0

func IsDesktopManagedCLI() bool

IsDesktopManagedCLI reports whether the current CLI binary is the one managed by the ToolHive Desktop application. It returns false on any error (fail open: show updates when uncertain).

func ValidateDesktopAlignment

func ValidateDesktopAlignment() error

ValidateDesktopAlignment checks if the current CLI binary conflicts with a desktop-managed CLI installation.

Returns nil if:

  • No marker file exists (no desktop installation)
  • Marker file is invalid or unreadable (treat as no desktop installation)
  • The target binary in the marker doesn't exist (desktop was uninstalled)
  • The current CLI is the desktop-managed CLI (paths match)

Returns an error if:

  • A valid marker file exists pointing to an existing binary
  • The current CLI is NOT the desktop-managed binary

Types

This section is empty.

Jump to

Keyboard shortcuts

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