Skip to content

Commit 06032b9

Browse files
authored
Use cross-platform user profile path for NuGet package root (#87)
1 parent 3d52884 commit 06032b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Src/Generate/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ public static ImmutableArray<PortableExecutableReference> All
645645
var nugetPackageRoot = Environment.GetEnvironmentVariable("NUGET_PACKAGES");
646646
if (string.IsNullOrEmpty(nugetPackageRoot))
647647
{
648-
nugetPackageRoot = Path.Combine(Environment.GetEnvironmentVariable("USERPROFILE")!, ".nuget", "packages");
648+
nugetPackageRoot = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages");
649649
}
650650

651651
var realPackagePaths = packagePaths.Select(x => Path.Combine(nugetPackageRoot, x)).ToArray();

0 commit comments

Comments
 (0)