Skip to content

Commit

Permalink
If caching fails we should recover - fixes #1152
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 21, 2015
1 parent caf8bfb commit 66c774f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.15.9 - 21.10.2015
* USABILITY: If caching fails we should recover - https://github.com/fsprojects/Paket/issues/1152

#### 2.15.8 - 20.10.2015
* Try to report better error when file is blocked by Firewall - https://github.com/fsprojects/Paket/pull/1155

Expand Down
5 changes: 4 additions & 1 deletion src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ let getDetailsFromNuGet force auth nugetURL (packageName:PackageName) (version:S

errorFile.Delete()
if invalidCache then
File.WriteAllText(cacheFile.FullName,JsonConvert.SerializeObject(details))
try
File.WriteAllText(cacheFile.FullName,JsonConvert.SerializeObject(details))
with
| _ -> () // if caching fails we should not fail
return details
with
| exn ->
Expand Down

0 comments on commit 66c774f

Please sign in to comment.