Skip to content

Commit 565bc99

Browse files
committed
NuGet Cache: ensure for clitool nupkg is there even after skipped 2nd extraction
1 parent 527c5f8 commit 565bc99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Paket.Core/Dependencies/NuGetCache.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,10 @@ let rec ExtractPackageToUserFolder(source: PackageSource, downloadedNupkgPath:st
520520
let newNupkgPath = Path.Combine(parentOfParent.FullName, Path.GetFileName downloadedNupkgPath)
521521
File.Move(downloadedNupkgPath, newNupkgPath)
522522
do! extract newNupkgPath
523-
File.Delete(newNupkgPath)
523+
if File.Exists(downloadedNupkgPath) then
524+
File.Delete(newNupkgPath)
525+
else
526+
File.Move(newNupkgPath, downloadedNupkgPath)
524527
else
525528
do! extract downloadedNupkgPath
526529

0 commit comments

Comments
 (0)