Skip to content

Refactor uninstallation #2952

@Ash258

Description

@Ash258

Implemented in shovel 0.5

  1. Remove similar uninstallation code
  2. Implement uninstallation of running applications
    • function Scoop-GetProcess($appname, $global) into core/install/uninstall
      • Return whole Get-Process
       <#
       .SYNOPSIS
       	Get all running processes for given app.
       .PARAMETER AppName
       	Name of the application.
       	Default to return all running applications. (Mainly for uninstallatino of whole scoop)
       .PARAMETER Global
       	Get process for globally installed applications.
       #>
       function Scoop-GetProcess {
       	param(
       		[String] $AppName = '*',
       		[Switch] $Global
       	)
      
       	$procs = Get-Process # Avoid calling twice for each path
       	if ($Global) {
       		return $procs | Where-Object { $_.Path -like "$globaldir\apps\$AppName\*" }
       	} else {
       		return $procs | Where-Object { $_.Path -like "$scoopdir\apps\$AppName\*" }
       	}
       }
    • Adopt libexecs for Get-Process
      • Uninstall
      • Update
  3. ❓ Add force parameter to uninstall for killing running applications

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions