Add config option "show_update_log" (#2133)

This commit is contained in:
Richard Kuhnt
2018-03-21 17:10:42 +01:00
parent f3f559c460
commit d68cb3ce52
+10 -2
View File
@@ -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
}