Skip to content

Commit

Permalink
auto uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven committed May 13, 2019
1 parent 81226ae commit 4aaba1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libexec/scoop-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function is_installed($app, $global) {

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

0 comments on commit 4aaba1f

Please sign in to comment.