From ce486873ac4e640d2e93d5cb68e8a168a48aec66 Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Thu, 27 Jun 2013 15:45:36 +1000 Subject: [PATCH] installed_apps returns empty when no appdir --- lib/core.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index db8badd2..180f404b 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -19,7 +19,9 @@ function appdir($app) { "$scoopdir\apps\$app" } function versiondir($app, $version) { "$(appdir $app)\$version" } function installed($app) { return test-path (appdir $app) } function installed_apps { - gci ( "$scoopdir\apps") | where { $_.psiscontainer -and $_.name -ne 'scoop' } | % { $_.name } + if(test-path "$scoopdir\apps") { + gci ( "$scoopdir\apps") | where { $_.psiscontainer -and $_.name -ne 'scoop' } | % { $_.name } + } } # paths