Skip to content

Commit

Permalink
Check for running process before wasting time on download
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlwatsonjr committed Feb 6, 2024
1 parent 5328bef commit 685f5d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ function update($app, $global, $quiet = $false, $independent, $suggested, $use_c

Write-Host "Updating '$app' ($old_version -> $version)"

#region Workaround for #2952
if (test_running_process $app $global) {
return
}
#endregion Workaround for #2952

# region Workaround
# Workaround for https://github.com/ScoopInstaller/Scoop/issues/2220 until install is refactored
# Remove and replace whole region after proper fix
Expand Down Expand Up @@ -280,12 +286,6 @@ function update($app, $global, $quiet = $false, $independent, $suggested, $use_c

Invoke-HookScript -HookType 'pre_uninstall' -Manifest $old_manifest -Arch $architecture

#region Workaround for #2952
if (test_running_process $app $global) {
return
}
#endregion Workaround for #2952

Write-Host "Uninstalling '$app' ($old_version)"
run_uninstaller $old_manifest $architecture $dir
rm_shims $app $old_manifest $global $architecture
Expand Down

0 comments on commit 685f5d6

Please sign in to comment.