Skip to content

Commit e997017

Browse files
committed
fix(update): Fix scoop update changelog output
1 parent 8ee45a5 commit e997017

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

libexec/scoop-update.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function update_scoop() {
9191
} else {
9292
Push-Location $currentdir
9393

94-
$currentRepo = git_config remote.origin.url
94+
$previousCommit = Invoke-Expression 'git rev-parse HEAD'
9595
$currentRepo = Invoke-Expression "git config remote.origin.url"
9696
$currentBranch = Invoke-Expression "git branch"
9797

@@ -119,7 +119,7 @@ function update_scoop() {
119119

120120
$res = $lastexitcode
121121
if ($show_update_log) {
122-
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
122+
Invoke-Expression "git --no-pager log --no-decorate --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'"
123123
}
124124

125125
Pop-Location
@@ -148,9 +148,10 @@ function update_scoop() {
148148
}
149149

150150
Push-Location $loc
151+
$previousCommit = (Invoke-Expression 'git rev-parse HEAD')
151152
git_pull -q
152153
if ($show_update_log) {
153-
git_log --no-decorate --date=local --since="`"$last_update`"" --format="`"tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset`"" HEAD
154+
Invoke-Expression "git --no-pager log --no-decorate --format='tformat: * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset' '$previousCommit..HEAD'"
154155
}
155156
Pop-Location
156157
}

0 commit comments

Comments
 (0)