Use ~/.powershell for ConsoleHost profile on Linux

This commit is contained in:
Andrew Schwartzmeyer
2016-05-17 13:28:44 -07:00
parent 8af7d5f344
commit 2e71a090e7
@@ -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))
{