Skip to content

Commit

Permalink
Fix timing issue with paket install --hard - fixes #293
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 24, 2014
1 parent 2464bcb commit 46e22fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 0.10.0-alpha003 - 24.10.2014
* Fix timing issue with paket install --hard - https://github.com/fsprojects/Paket/issues/293

#### 0.10.0-alpha002 - 24.10.2014
* Paket add doesn't fail on second attempt - https://github.com/fsprojects/Paket/issues/295

Expand Down
19 changes: 12 additions & 7 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,21 @@ type ProjectFile =
member this.UpdateReferences(completeModel: Map<string,InstallModel>, usedPackages : Dictionary<string,bool>, hard) =
this.DeletePaketNodes("Reference")
this.DeleteEmptyReferences()
for kv in usedPackages do
let packageName = kv.Key
let installModel = completeModel.[packageName.ToLower()]

if hard then
if hard then
for kv in usedPackages do
let installModel = completeModel.[kv.Key.ToLower()]
this.DeleteCustomNodes(installModel)

if this.HasCustomNodes(installModel) then verbosefn " - custom nodes for %s ==> skipping" packageName else
let chooseNode = this.GenerateXml(installModel)
this.ProjectNode.AppendChild(chooseNode) |> ignore
for kv in usedPackages do
let packageName = kv.Key
let installModel = completeModel.[packageName.ToLower()]

if this.HasCustomNodes(installModel) then
verbosefn " - custom nodes for %s ==> skipping" packageName
else
let chooseNode = this.GenerateXml(installModel)
this.ProjectNode.AppendChild(chooseNode) |> ignore

member this.Save() =
if Utils.normalizeXml this.Document <> this.OriginalText then
Expand Down

0 comments on commit 46e22fb

Please sign in to comment.