Skip to content

Commit

Permalink
fix(scoop-bucket): Fix date formatting issues with git bucket(s) (Sco…
Browse files Browse the repository at this point in the history
  • Loading branch information
HUMORCE authored Feb 25, 2022
1 parent 4047d69 commit 0cb6152
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
- **versions:** Fix wrong version number when only one version dir ([#4679](https://github.com/ScoopInstaller/Scoop/issues/4679))
- **versions:** Get current version from failed installation if possible ([#4720](https://github.com/ScoopInstaller/Scoop/issues/4720), [#4725](https://github.com/ScoopInstaller/Scoop/issues/4725))
- **scoop-alias:** Fix alias initialization ([#4737](https://github.com/ScoopInstaller/Scoop/issues/4737))
- **scoop-bucket:** Check for git before running command ([#4756](https://github.com/ScoopInstaller/Scoop/issues/4756))
- **scoop-bucket:** Fix date formatting issues with git bucket(s) ([#4759](https://github.com/ScoopInstaller/Scoop/issues/4759))
- **scoop-checkup:** Skip 'check_windows_defender' when have not admin privileges ([#4699](https://github.com/ScoopInstaller/Scoop/issues/4699))
- **scoop-cleanup:** Remove apps other than current version ([#4665](https://github.com/ScoopInstaller/Scoop/issues/4665))
- **scoop-update:** Skip updating non git buckets ([#4670](https://github.com/ScoopInstaller/Scoop/issues/4670), [#4672](https://github.com/ScoopInstaller/Scoop/issues/4672))
- **scoop-bucket:** Check for git before running command ([#4756](https://github.com/ScoopInstaller/Scoop/issues/4756))

### Performance Improvements

Expand Down
4 changes: 2 additions & 2 deletions libexec/scoop-bucket.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function list_buckets {
)
$updated = 'N/A'
if ((Test-Path (Join-Path $source '.git')) -and (Get-Command git -ErrorAction SilentlyContinue)) {
$updated = git -C "`"$source`"" log --date=format:"`"%d-%m-%Y %H:%M:%S`"" --format='%ad' -n 1 | Get-Date
$source = git -C "`"$source`"" config remote.origin.url
$updated = git -C $source log --format='%aD' -n 1 | Get-Date
$source = git -C $source config remote.origin.url
} else {
$updated = (Get-Item "$source\bucket").LastWriteTime
$source = friendly_path $source
Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-status.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $needs_update = $false

if(Test-Path "$currentdir\.git") {
git_cmd -C "`"$currentdir`"" fetch -q origin
$commits = $(git -C "`"$currentdir`"" log "HEAD..origin/$(scoop config SCOOP_BRANCH)" --oneline)
$commits = $(git -C $currentdir log "HEAD..origin/$(scoop config SCOOP_BRANCH)" --oneline)
if($commits) { $needs_update = $true }
}
else {
Expand Down

0 comments on commit 0cb6152

Please sign in to comment.