Skip to content

Commit 4aaba1f

Browse files
committed
auto uninstall
1 parent 81226ae commit 4aaba1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libexec/scoop-install.ps1

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function is_installed($app, $global) {
3939

4040
$version = @(versions $app $global)[-1]
4141
if (!(install_info $app $version $global)) {
42-
error "It looks like a previous installation of $app failed.`nRun 'scoop uninstall $app$(gf $global)' before retrying the install."
42+
warn "Purging previous failed installation of $app."
43+
& "$PSScriptRoot\scoop-uninstall.ps1" $app $(if ($global) { "--global" })
44+
return $false
4345
}
4446
warn "'$app' ($version) is already installed.`nUse 'scoop update $app$(gf $global)' to install a new version."
4547
return $true

0 commit comments

Comments
 (0)