installed_apps returns empty when no appdir

This commit is contained in:
Luke Sampson
2013-06-27 15:45:36 +10:00
parent 9f4be7d3cd
commit ce486873ac
+3 -1
View File
@@ -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