diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index c2e5396626..b7748cd973 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -163,6 +163,11 @@ namespace System.Management.Automation else { + if (!Directory.Exists(Path.Combine(xdgcachehome, "powershell"))) + { + Directory.CreateDirectory(Path.Combine(xdgcachehome, "powershell")); + } + return Path.Combine(xdgcachehome, "powershell"); }