Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libexec/scoop-bucket.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ function list_buckets {
Measure-Object | Select-Object -ExpandProperty Count
)
$updated = 'N/A'
if (Test-Path (Join-Path $source '.git')) {
$updated = git -C "`"$source`"" log --date=format:"`"%Y-%m-%d %H:%M:%S`"" --format='%ad' -n 1
if ((Test-Path (Join-Path $source '.git')) -and (Get-Command git -ErrorAction Ignore)) {
Comment thread
rashil2000 marked this conversation as resolved.
Outdated
$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
} else {
$updated = (Get-Item "$source\bucket").LastWriteTime | Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
$updated = (Get-Item "$source\bucket").LastWriteTime
$source = friendly_path $source
}
$buckets += New-Object PSObject -Property @{
Expand Down