diff --git a/libexec/scoop-status.ps1 b/libexec/scoop-status.ps1 index ba0132dd11..824f765751 100644 --- a/libexec/scoop-status.ps1 +++ b/libexec/scoop-status.ps1 @@ -55,7 +55,8 @@ $true, $false | ForEach-Object { # local and global apps $dir = appsdir $global if (!(Test-Path $dir)) { return } - [string[]] $appNames = (Get-ChildItem $dir -Directory -Name -Exclude 'scoop' | Where-Object Length -GT 0) ?? @() + $appNames = @(Get-ChildItem $dir -Directory -Name -Exclude 'scoop' | Where-Object Length -GT 0) + if ($appNames.Length -eq 0) { return } foreach ($app in $appNames) {