Skip to content

Commit

Permalink
Fix case sensitivity on package name
Browse files Browse the repository at this point in the history
Paket isn't case sensitive so names can be upper case in paket.lock but
lowercase in paket.references
  • Loading branch information
klettier committed Jan 19, 2016
1 parent 474eb69 commit ecb4737
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/FakeLib/PaketHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ let GetDependenciesForReferencesFile (referencesFile:string) =
find <| FileInfo(referencesFile).Directory.FullName

let lines = File.ReadAllLines(lockFile)
|> Array.map (fun s -> s.Trim())

let getVersion package =
let line = lines |> Array.find (fun l -> l.StartsWith(" " + package))
let start = line.Replace(" " + package + " (","")
let line = lines |> Array.find (fun l -> l.StartsWith(package, StringComparison.InvariantCultureIgnoreCase))
let start = line.Replace(package + " (","")
start.Substring(0,start.IndexOf(")"))

nugetLines
Expand Down

1 comment on commit ecb4737

@forki
Copy link
Member

@forki forki commented on ecb4737 Jan 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should trim. The spaces were there to find only package lines and to exclude package dependency lines.

Please sign in to comment.