Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.fs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,19 @@ type FSharpDependencyManager(outputDirectory: string option, useResultsCache: bo
// if a path was supplied if it was rooted then use the rooted path as the root
// if the path wasn't supplied or not rooted use the temp directory as the root.
let specialDir =
Path.Combine(Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile), ".packagemanagement", "nuget")
let getProfilePath =
// If it has a directory seperator remove it
let path = Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile)

if
(path.EndsWith(Path.DirectorySeparatorChar.ToString()))
|| (path.EndsWith(Path.AltDirectorySeparatorChar.ToString()))
then
path.Substring(0, path.Length - 1)
else
path
// Build path to cache root
$"{getProfilePath}/.packagemanagement/nuget"

let path =
Path.Combine(Process.GetCurrentProcess().Id.ToString() + "--" + Guid.NewGuid().ToString())
Expand Down