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

perf(scoop-update): Check for running process before wasting time on download #5799

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions libexec/scoop-update.ps1
Expand Up @@ -241,6 +241,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
niheaven marked this conversation as resolved.
Show resolved Hide resolved
}
#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 @@ -281,12 +287,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