From d1771c481bbf115eef11dc7bdaec1d3f51b63416 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Sun, 14 Feb 2016 11:32:42 +0100 Subject: [PATCH] Do not try to pack output folder - fixes #1473 --- RELEASE_NOTES.md | 3 +++ src/Paket.Core/NupkgWriter.fs | 4 +++- src/Paket/Paket.fsproj | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1472cf7467..345b1beef7 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.50.9 - 14.02.2016 +* BUGFIX: Do not try to pack output folder - https://github.com/fsprojects/Paket/issues/1473 + #### 2.50.8 - 13.02.2016 * Experimental Visual C++ support in binding redirects - https://github.com/fsprojects/Paket/issues/1467 diff --git a/src/Paket.Core/NupkgWriter.fs b/src/Paket.Core/NupkgWriter.fs index 33608259eb..e29a601714 100644 --- a/src/Paket.Core/NupkgWriter.fs +++ b/src/Paket.Core/NupkgWriter.fs @@ -188,6 +188,7 @@ let writeNupkg (core : CompleteCoreInfo) optional = relsPath, relsDoc core |> xDocWriter ] let Write (core : CompleteCoreInfo) optional workingDir outputDir = + let outputFolder = DirectoryInfo(outputDir).FullName |> normalizePath let outputPath = Path.Combine(outputDir, core.PackageFileName) if File.Exists outputPath then File.Delete outputPath @@ -223,7 +224,7 @@ let Write (core : CompleteCoreInfo) optional workingDir outputDir = let isExcluded p = let path = DirectoryInfo(p).FullName - exclusions |> List.exists (fun f -> f path) + normalizePath path = outputFolder || (exclusions |> List.exists (fun f -> f path)) let ensureValidName (target: string) = // Some characters that are considered reserved by RFC 2396 @@ -275,6 +276,7 @@ let Write (core : CompleteCoreInfo) optional workingDir outputDir = let addEntryFromFile path source = if entries.Contains(path) then () else entries.Add path |> ignore + zipFile.CreateEntryFromFile(source,path) |> ignore let ensureValidTargetName (target:string) = diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index c49a6c803e..ee23eed911 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -50,7 +50,7 @@ pack -v output "D:\code\Paket\integrationtests\scenarios\i001376-pack-template\temp\out" templatefile "D:\code\Paket\integrationtests\scenarios\i001376-pack-template\temp\PaketBug\paket.template" pack -v output D:\code\Paket\integrationtests\scenarios\i001429-pack-deps\temp\out pack output "out/nuget" version 0.9.3 releaseNotes "[LanguageExtensions][New] New Ensure methods with exception parameter." include-referenced-projects - update + pack templatefile paket.template output o Project paket.exe c:\code\Paketkopie @@ -62,7 +62,7 @@ C:\code\restore D:\code\Paket\integrationtests\scenarios\i001450-twiddle-wakka\temp D:\code\Paket-issue-1469 - D:\code\Paket\integrationtests\scenarios\i001467-cpp-native\temp + D:\code\Paket\integrationtests\scenarios\i001473-blocking\temp pdbonly