File tree Expand file tree Collapse file tree 1 file changed +8
-21
lines changed Expand file tree Collapse file tree 1 file changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -167,27 +167,14 @@ export class PlatformInformation {
167167 }
168168
169169 private static GetWindowsArchitecture ( ) : Promise < string > {
170- return util . execChildProcess ( 'wmic os get osarchitecture' )
171- . then ( architecture => {
172- if ( architecture ) {
173- let archArray : string [ ] = architecture . split ( os . EOL ) ;
174- if ( archArray . length >= 2 ) {
175- let arch = archArray [ 1 ] . trim ( ) ;
176-
177- // Note: This string can be localized. So, we'll just check to see if it contains 32 or 64.
178- if ( arch . indexOf ( '64' ) >= 0 ) {
179- return "x86_64" ;
180- }
181- else if ( arch . indexOf ( '32' ) >= 0 ) {
182- return "x86" ;
183- }
184- }
185- }
186-
187- return unknown ;
188- } ) . catch ( ( error ) => {
189- return unknown ;
190- } ) ;
170+ return new Promise < string > ( ( resolve , reject ) => {
171+ if ( process . env . PROCESSOR_ARCHITECTURE === 'x86' && process . env . PROCESSOR_ARCHITEW6432 === undefined ) {
172+ resolve ( 'x86' ) ;
173+ }
174+ else {
175+ resolve ( 'x86_64' ) ;
176+ }
177+ } ) ;
191178 }
192179
193180 private static GetUnixArchitecture ( ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments