File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/PowerShellEditorServices/Session Expand file tree Collapse file tree 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)
134134 }
135135
136136 var arch = PowerShellContext . ExecuteScriptAndGetItem < string > ( "$env:PROCESSOR_ARCHITECTURE" , runspace ) ;
137- if ( string . Equals ( arch , "AMD64" , StringComparison . CurrentCultureIgnoreCase ) )
137+ if ( arch != null )
138138 {
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+ }
144147 }
145148 }
146149 }
You can’t perform that action at this time.
0 commit comments