We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3e9224 commit d87abd7Copy full SHA for d87abd7
1 file changed
update-all-repos.ps1
@@ -100,8 +100,12 @@ function Get-GitRepos {
100
if ($Depth -eq 1) {
101
Write-Host " Scanning $Path" -ForegroundColor Gray
102
}
103
- if (Test-Path (Join-Path $Path ".git")) {
104
- $script:ReposFoundList.Add($Path) | Out-Null
+ try {
+ if (Test-Path (Join-Path $Path ".git") -ErrorAction SilentlyContinue) {
105
+ $script:ReposFoundList.Add($Path) | Out-Null
106
+ }
107
+ } catch {
108
+ # Silently skip paths we don't have permission to read
109
110
if ($MaxDepth -gt 0 -and $Depth -ge $MaxDepth) { return }
111
Get-ChildItem -Path $Path -Directory -ErrorAction SilentlyContinue | ForEach-Object {
0 commit comments