From b2bd1af50b2227c8222b736db4f586e18d41bbcd Mon Sep 17 00:00:00 2001 From: scil Date: Tue, 7 Apr 2026 13:43:32 -0700 Subject: [PATCH] make warn `use 'scoop update --- to install a new version.` for `scoop install` more friendly to users add `scoop update ---` to a new line, make it easy to be copyed --- libexec/scoop-install.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/scoop-install.ps1 b/libexec/scoop-install.ps1 index 0fadcff09d..67daff8b00 100644 --- a/libexec/scoop-install.ps1 +++ b/libexec/scoop-install.ps1 @@ -80,7 +80,7 @@ if ($apps.length -eq 1) { } $curVersion = Select-CurrentVersion -AppName $app -Global:$global if ($null -eq $version -and $curVersion) { - warn "'$app' ($curVersion) is already installed.`nUse 'scoop update $app$(if ($global) { ' --global' })' to install a new version." + warn "'$app' ($curVersion) is already installed.`nUse 'scoop update $app$(if ($global) { ' --global' })' to install a new version.`n`tscoop update $app$(if ($global) { ' --global' })" exit 0 } } @@ -101,7 +101,7 @@ if ($specific_versions.Count -gt 0) { $specific_versions_paths = $specific_versions | ForEach-Object { $app, $bucket, $version = parse_app $_ if (installed_manifest $app $version) { - warn "'$app' ($version) is already installed.`nUse 'scoop update $app$(if ($global) { ' --global' })' to install a new version." + warn "'$app' ($curVersion) is already installed.`nUse 'scoop update $app$(if ($global) { ' --global' })' to install a new version.`n`tscoop update $app$(if ($global) { ' --global' })" continue }