Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor uninstallation #2952

Closed
3 tasks
Ash258 opened this issue Jan 5, 2019 · 1 comment
Closed
3 tasks

Refactor uninstallation #2952

Ash258 opened this issue Jan 5, 2019 · 1 comment

Comments

@Ash258
Copy link
Contributor

Ash258 commented Jan 5, 2019

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
@TheRandomLabs
Copy link

TheRandomLabs commented Oct 16, 2019

Not sure if this is the right place for this, but would it be possible to add an option to run the uninstaller script regardless of whether the application is still running? Corsair iCUE's uninstaller automatically kills all of its processes before uninstalling, but it's unnecessarily difficult to have to kill all Corsair iCUE processes before uninstalling, as they also include services.

@Ash258 Ash258 closed this as completed Jul 8, 2020
r15ch13 pushed a commit that referenced this issue May 20, 2021
The issue is the same as for #2952, workaround until the proper
solution is implemented. The code is also directly copied from there.

Fixes #4310
slaughtering pushed a commit to slaughtering/scoop that referenced this issue Jun 25, 2021
The issue is the same as for ScoopInstaller#2952, workaround until the proper
solution is implemented. The code is also directly copied from there.

Fixes ScoopInstaller#4310
Lutra-Fs added a commit to Lutra-Fs/Scoop that referenced this issue Oct 11, 2023
rashil2000 added a commit that referenced this issue Oct 26, 2023
…p is running (#5687)

* fix(scoop-reset): change #2952 fix to be the same with scoop-install

* update changelog

* Update CHANGELOG.md

Co-authored-by: Rashil Gandhi <[email protected]>

---------

Co-authored-by: Rashil Gandhi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants