File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44#if ! PSV3
55using System ;
66using System . Collections . Generic ;
7- using System . Collections . ObjectModel ;
87using System . IO ;
98using System . Linq ;
109using System . Management . Automation ;
1110using System . Management . Automation . Language ;
1211using System . Management . Automation . Runspaces ;
12+ using System . Runtime . InteropServices ;
1313
1414namespace Microsoft . Windows . PowerShell . ScriptAnalyzer . Generic
1515{
@@ -75,7 +75,7 @@ private set
7575#if CORECLR
7676 localAppdataPath
7777 = string . IsNullOrWhiteSpace ( value )
78- ? Environment . GetEnvironmentVariable ( "LOCALAPPDATA" )
78+ ? Environment . GetEnvironmentVariable ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? "LOCALAPPDATA" : "HOME" ) //Environment.GetEnvironmentVariable( "LOCALAPPDATA")
7979 : value ;
8080#else
8181 localAppdataPath
@@ -215,7 +215,7 @@ private string GetTempModulePath(string symLinkPath)
215215 private void SetupPSModulePath ( )
216216 {
217217 oldPSModulePath = Environment . GetEnvironmentVariable ( "PSModulePath" ) ;
218- curPSModulePath = oldPSModulePath + ";" + tempModulePath ;
218+ curPSModulePath = oldPSModulePath + Path . PathSeparator + tempModulePath ;
219219#if CORECLR
220220 Environment . SetEnvironmentVariable ( "PSModulePath" , curPSModulePath ) ;
221221#else
You can’t perform that action at this time.
0 commit comments