mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use ~/.powershell for ConsoleHost profile on Linux
This commit is contained in:
@@ -170,8 +170,15 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
try
|
||||
{
|
||||
var profileDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
|
||||
@"\Microsoft\Windows\PowerShell";
|
||||
string profileDir;
|
||||
if (Platform.IsWindows)
|
||||
{
|
||||
profileDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
|
||||
@"\Microsoft\Windows\PowerShell";
|
||||
} else
|
||||
{
|
||||
profileDir = System.IO.Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".powershell");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(profileDir))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user