Skip to content

Commit 1226860

Browse files
committed
fix(scoop): Add missing brackets, improve version output for better compatibility
1 parent ff38652 commit 1226860

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
### Bug Fixes
44

5-
- **scoop-download**: Fix function `nightly_version` not defined error ([#6386](https://github.com/ScoopInstaller/Scoop/issues/6386))
5+
- **scoop-download:** Fix function `nightly_version` not defined error ([#6386](https://github.com/ScoopInstaller/Scoop/issues/6386))
66
- **autoupdate:** Use origin URL to handle URLs with fragment in GitHub mode ([#6455](https://github.com/ScoopInstaller/Scoop/issues/6455))
77
- **buckets|scoop-info:** Switch git log date format to ISO 8601 to avoid locale issues ([#6446](https://github.com/ScoopInstaller/Scoop/pull/6446))
8+
- **scoop:** Fix logic error caused by missing brackets, improve version output for better compatibility ([#6463](https://github.com/ScoopInstaller/Scoop/pull/6463))
89

910
## [v0.5.3](https://github.com/ScoopInstaller/Scoop/compare/v0.5.2...v0.5.3) - 2025-08-11
1011

bin/scoop.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ switch ($subCommand) {
2020
}
2121
({ $subCommand -in @('-v', '--version') }) {
2222
Write-Host 'Current Scoop version:'
23-
if (Test-GitAvailable -and (Test-Path "$PSScriptRoot\..\.git") -and (get_config SCOOP_BRANCH 'master') -ne 'master') {
24-
Invoke-Git -Path "$PSScriptRoot\.." -ArgumentList @('log', 'HEAD', '-1', '--oneline')
23+
if ((Test-GitAvailable) -and (Test-Path "$PSScriptRoot\..\.git") -and ((get_config SCOOP_BRANCH 'master') -ne 'master')) {
24+
Invoke-Git -Path "$PSScriptRoot\.." -ArgumentList @('--no-pager', 'log', 'HEAD', '-1', '--oneline', '--decorate')
2525
} else {
2626
$version = Select-String -Pattern '^## \[(v[\d.]+)\].*?([\d-]+)$' -Path "$PSScriptRoot\..\CHANGELOG.md"
2727
Write-Host $version.Matches.Groups[1].Value -ForegroundColor Cyan -NoNewline
@@ -31,9 +31,9 @@ switch ($subCommand) {
3131

3232
Get-LocalBucket | ForEach-Object {
3333
$bucketLoc = Find-BucketDirectory $_ -Root
34-
if (Test-GitAvailable -and (Test-Path "$bucketLoc\.git")) {
34+
if ((Test-GitAvailable) -and (Test-Path "$bucketLoc\.git")) {
3535
Write-Host "'$_' bucket:"
36-
Invoke-Git -Path $bucketLoc -ArgumentList @('log', 'HEAD', '-1', '--oneline')
36+
Invoke-Git -Path $bucketLoc -ArgumentList @('--no-pager', 'log', 'HEAD', '-1', '--oneline', '--decorate')
3737
Write-Host ''
3838
}
3939
}

0 commit comments

Comments
 (0)