uninstall

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2025 PRAS

Index

Constants

This section is empty.

Variables

View Source
var UninstallCmd = &cobra.Command{
	Use:   "uninstall",
	Short: "Uninstall plasmoid system-wide",
	Long:  "Uninstall the plasmoid from the system directories.",
	Run: func(cmd *cobra.Command, args []string) {
		if !utilsIsValidPlasmoid() {
			color.Red("Current directory is not a valid plasmoid.")
			return
		}
		if err := UninstallPlasmoid(); err != nil {
			color.Red("Failed to uninstall plasmoid:", err)
			return
		}
		color.Green("Plasmoid uninstalled successfully")
	},
}

UninstallCmd represents the production command

View Source
var UninstallPlasmoid = func() error {
	isInstalled, where, err := utilsIsInstalled()
	if err != nil {
		return err
	}
	if isInstalled {
		if err := osRemoveAll(where); err != nil {
			return fmt.Errorf("failed to remove installation directory %s: %w", where, err)
		}
	}
	return nil
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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