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 f930280 commit b6cbf0a
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 @@ -220,6 +220,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 @@ -260,12 +266,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 b6cbf0a

Please sign in to comment.