File tree Expand file tree Collapse file tree
Cli/Microsoft.TemplateEngine.Cli/Commands
RazorSdk/Tool/ServerProtocol Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ private static string GetUserProfileDir(IEnvironment environment) => environment
4242 RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
4343 ? "USERPROFILE"
4444 : "HOME" )
45+ ?? Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile )
4546 ?? throw new NotSupportedException ( "HOME or USERPROFILE environment variable is not defined, the environment is not supported" ) ;
4647
4748 private static string GetGlobalSettingsDir ( string ? settingsLocation )
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public static string GetTempPath(string workingDir)
7777 }
7878 }
7979
80- var userProfile = Environment . GetEnvironmentVariable ( "USERPROFILE" ) ;
80+ var userProfile = Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ;
8181 if ( Path . IsPathRooted ( userProfile ) )
8282 {
8383 return userProfile ;
You can’t perform that action at this time.
0 commit comments