Skip to content

Commit 1199708

Browse files
committed
Probe for unnormalized and normalized versions in local NuGet feeds - fixes #556
1 parent 26f246a commit 1199708

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎RELEASE_NOTES.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 0.23.1 - 19.01.2015
2+
* Probe for unnormalized and normalized versions in local NuGet feeds - https://github.com/fsprojects/Paket/issues/556
3+
14
#### 0.23.0 - 15.01.2015
25
* Refactored `init` & `init auto restore` to Railway Oriented Programming - https://github.com/fsprojects/Paket/pull/533
36
* Refactored FindRefs to Railway Oriented Programming - https://github.com/fsprojects/Paket/pull/529

‎src/Paket.Core/NuGetV2.fs‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,15 @@ let getDetailsFromNuget force auth nugetURL package (version:SemVerInfo) =
271271

272272
/// Reads direct dependencies from a nupkg file
273273
let getDetailsFromLocalFile localNugetPath package (version:SemVerInfo) =
274-
async {
275-
let version = version.Normalize()
276-
let nupkg = FileInfo(Path.Combine(localNugetPath, sprintf "%s.%s.nupkg" package version))
274+
async {
275+
let nupkg =
276+
let v1 = FileInfo(Path.Combine(localNugetPath, sprintf "%s.%s.nupkg" package (version.ToString())))
277+
if v1.Exists then v1 else
278+
let version = version.Normalize()
279+
FileInfo(Path.Combine(localNugetPath, sprintf "%s.%s.nupkg" package version))
280+
277281
if not nupkg.Exists then
278-
failwithf "The package %s %s can't be found in %s.%sPlease check the feed definition in your paket.dependencies file." package version localNugetPath Environment.NewLine
282+
failwithf "The package %s %s can't be found in %s.%sPlease check the feed definition in your paket.dependencies file." package (version.ToString()) localNugetPath Environment.NewLine
279283
let zip = ZipFile.Read(nupkg.FullName)
280284
let zippedNuspec = (zip |> Seq.find (fun f -> f.FileName.EndsWith ".nuspec"))
281285

0 commit comments

Comments
 (0)