Skip to content

Commit

Permalink
garbage collector can ignore not existing directories
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Aug 20, 2017
1 parent ae07516 commit 0de4045
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Paket.Core/Installation/GarbageCollection.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ let discoverDirectExtractedPackages groupName groupPackagesDirectory : Extracted
| _ -> None

let findGroupPackages groupName (groupDir:DirectoryInfo) =
groupDir.GetDirectories()
|> Array.choose (packageInDir groupName)
if groupDir.Exists then
groupDir.GetDirectories()
|> Array.choose (packageInDir groupName)
else [||]

let packagesFolder = groupPackagesDirectory
findGroupPackages groupName packagesFolder
Expand Down

0 comments on commit 0de4045

Please sign in to comment.