Skip to content

Commit 3dfb4bf

Browse files
authored
fix(buckets): Avoid error messages for unexpected dir (#5549)
1 parent 1d14058 commit 3dfb4bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- **scoop-info:** Fix errors in file size collection when `--verbose` ([#5352](https://github.com/ScoopInstaller/Scoop/pull/5352))
2424
- **shim:** Use bash executable directly ([#5433](https://github.com/ScoopInstaller/Scoop/issues/5433))
2525
- **scoop-checkup:** Skip defender check in Windows Sandbox ([#5519]https://github.com/ScoopInstaller/Scoop/issues/5519)
26+
- **buckets:** Avoid error messages for unexpected dir ([#5549]https://github.com/ScoopInstaller/Scoop/issues/5549)
2627

2728
### Performance Improvements
2829

lib/buckets.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function list_buckets {
111111
$bucket.Updated = Invoke-Git -Path $path -ArgumentList @('log', '--format=%aD', '-n', '1') | Get-Date
112112
} else {
113113
$bucket.Source = friendly_path $path
114-
$bucket.Updated = (Get-Item "$path\bucket").LastWriteTime
114+
$bucket.Updated = (Get-Item "$path\bucket" -ErrorAction SilentlyContinue).LastWriteTime
115115
}
116116
$bucket.Manifests = Get-ChildItem "$path\bucket" -Force -Recurse -ErrorAction SilentlyContinue |
117117
Measure-Object | Select-Object -ExpandProperty Count

0 commit comments

Comments
 (0)