Skip to content

Commit

Permalink
reset: skip when app instance is running (ScoopInstaller#4359)
Browse files Browse the repository at this point in the history
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
FriendlyNeighborhoodShane authored and slaughtering committed Jun 25, 2021
1 parent 5caa8fd commit f7a74fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libexec/scoop-reset.ps1
Original file line number Diff line number Diff line change
@@ -67,6 +67,14 @@ $apps | ForEach-Object {
$original_dir = $dir
$persist_dir = persistdir $app $global

#region Workaround for #2952
$processdir = $dir | Select-Object -ExpandProperty Path
if (Get-Process | Where-Object { $_.Path -like "$processdir\*" }) {
error "Application is still running. Close all instances and try again."
continue
}
#endregion Workaround for #2952

$install = install_info $app $version $global
$architecture = $install.architecture

0 comments on commit f7a74fc

Please sign in to comment.