Update ModuleAnalysisCache to use XDGBDS on Linux

This commit is contained in:
Andrew Schwartzmeyer 2016-06-06 14:26:13 -07:00
parent 4b0c916646
commit d5f6295042

View File

@ -1015,8 +1015,10 @@ namespace System.Management.Automation
{
cacheStoreLocation =
Environment.GetEnvironmentVariable("PSModuleAnalysisCachePath") ??
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"Microsoft\Windows\PowerShell\ModuleAnalysisCache");
(Platform.IsWindows
? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"Microsoft\Windows\PowerShell\ModuleAnalysisCache")
: Path.Combine(Platform.SelectProductNameForDirectory(Platform.XDG_Type.CACHE), "ModuleAnalysisCache"));
}
}