mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-08-26 08:06:36 +00:00
Add config option "show_update_log" (#2133)
This commit is contained in:
@@ -54,6 +54,10 @@ function update_scoop() {
|
||||
|
||||
write-host "Updating Scoop..."
|
||||
$last_update = $(last_scoop_update).ToString('s')
|
||||
$show_update_log = get_config "show_update_log"
|
||||
if($show_update_log -eq $null) {
|
||||
$show_update_log = $true
|
||||
}
|
||||
$currentdir = fullpath $(versiondir 'scoop' 'current')
|
||||
if(!(test-path "$currentdir\.git")) {
|
||||
$newdir = fullpath $(versiondir 'scoop' 'new')
|
||||
@@ -74,7 +78,9 @@ function update_scoop() {
|
||||
Push-Location $currentdir
|
||||
git_pull -q
|
||||
$res = $lastexitcode
|
||||
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
|
||||
if($show_update_log) {
|
||||
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
|
||||
}
|
||||
if($res -ne 0) {
|
||||
abort 'Update failed.'
|
||||
}
|
||||
@@ -88,7 +94,9 @@ function update_scoop() {
|
||||
write-host "Updating '$_' bucket..."
|
||||
Push-Location (bucketdir $_)
|
||||
git_pull -q
|
||||
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
|
||||
if($show_update_log) {
|
||||
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
|
||||
}
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user