File tree 1 file changed +9
-6
lines changed
src/PowerShellEditorServices/Session
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -134,13 +134,16 @@ public static PowerShellVersionDetails GetVersionDetails(Runspace runspace)
134
134
}
135
135
136
136
var arch = PowerShellContext . ExecuteScriptAndGetItem < string > ( "$env:PROCESSOR_ARCHITECTURE" , runspace ) ;
137
- if ( string . Equals ( arch , "AMD64" , StringComparison . CurrentCultureIgnoreCase ) )
137
+ if ( arch != null )
138
138
{
139
- architecture = PowerShellProcessArchitecture . X64 ;
140
- }
141
- else if ( string . Equals ( arch , "x86" , StringComparison . CurrentCultureIgnoreCase ) )
142
- {
143
- architecture = PowerShellProcessArchitecture . X86 ;
139
+ if ( string . Equals ( arch , "AMD64" , StringComparison . CurrentCultureIgnoreCase ) )
140
+ {
141
+ architecture = PowerShellProcessArchitecture . X64 ;
142
+ }
143
+ else if ( string . Equals ( arch , "x86" , StringComparison . CurrentCultureIgnoreCase ) )
144
+ {
145
+ architecture = PowerShellProcessArchitecture . X86 ;
146
+ }
144
147
}
145
148
}
146
149
}
You can’t perform that action at this time.
0 commit comments