File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Cli/Microsoft.TemplateEngine.Cli/Commands
RazorSdk/Tool/ServerProtocol Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ private static string GetUserProfileDir(IEnvironment environment) => environment
42
42
RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
43
43
? "USERPROFILE"
44
44
: "HOME" )
45
+ ?? Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile )
45
46
?? throw new NotSupportedException ( "HOME or USERPROFILE environment variable is not defined, the environment is not supported" ) ;
46
47
47
48
private static string GetGlobalSettingsDir ( string ? settingsLocation )
Original file line number Diff line number Diff line change @@ -77,13 +77,7 @@ public static string GetTempPath(string workingDir)
77
77
}
78
78
}
79
79
80
- var userProfile = Environment . GetEnvironmentVariable ( "USERPROFILE" ) ;
81
- if ( Path . IsPathRooted ( userProfile ) )
82
- {
83
- return userProfile ;
84
- }
85
-
86
- return Environment . GetEnvironmentVariable ( "SYSTEMROOT" ) ;
80
+ return Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ;
87
81
}
88
82
89
83
public static Task < ServerResponse > RunOnServer (
You can’t perform that action at this time.
0 commit comments