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 4
4
#if ! PSV3
5
5
using System ;
6
6
using System . Collections . Generic ;
7
- using System . Collections . ObjectModel ;
8
7
using System . IO ;
9
8
using System . Linq ;
10
9
using System . Management . Automation ;
11
10
using System . Management . Automation . Language ;
12
11
using System . Management . Automation . Runspaces ;
12
+ using System . Runtime . InteropServices ;
13
13
14
14
namespace Microsoft . Windows . PowerShell . ScriptAnalyzer . Generic
15
15
{
@@ -75,7 +75,7 @@ private set
75
75
#if CORECLR
76
76
localAppdataPath
77
77
= string . IsNullOrWhiteSpace ( value )
78
- ? Environment . GetEnvironmentVariable ( "LOCALAPPDATA" )
78
+ ? Environment . GetEnvironmentVariable ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? "LOCALAPPDATA" : "HOME" ) //Environment.GetEnvironmentVariable( "LOCALAPPDATA")
79
79
: value ;
80
80
#else
81
81
localAppdataPath
@@ -215,7 +215,7 @@ private string GetTempModulePath(string symLinkPath)
215
215
private void SetupPSModulePath ( )
216
216
{
217
217
oldPSModulePath = Environment . GetEnvironmentVariable ( "PSModulePath" ) ;
218
- curPSModulePath = oldPSModulePath + ";" + tempModulePath ;
218
+ curPSModulePath = oldPSModulePath + Path . PathSeparator + tempModulePath ;
219
219
#if CORECLR
220
220
Environment . SetEnvironmentVariable ( "PSModulePath" , curPSModulePath ) ;
221
221
#else
You can’t perform that action at this time.
0 commit comments