File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 11import vscode = require( 'vscode' ) ;
22import Window = vscode . window ;
3- import os = require( 'os' ) ;
43
54export function registerOpenInISECommand ( ) : void {
65 var disposable = vscode . commands . registerCommand ( 'PowerShell.OpenInISE' , ( ) => {
@@ -10,27 +9,17 @@ export function registerOpenInISECommand(): void {
109
1110var uri = document . uri
1211
13- // For testing, to be removed
14- Window . showInformationMessage ( uri . fsPath ) ;
15- Window . showInformationMessage ( uri . path ) ;
16-
17- if ( os . arch ( ) == 'x64' ) {
12+ if ( process . env . hasOwnProperty ( 'PROCESSOR_ARCHITEW6432' ) ) {
1813
1914 var ISEPath = 'C:\\Windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell_ise.exe' ;
2015
2116} else
2217{
2318
24- // Need to figure out how to check OS architecture os.arch returns process architecture
25- //var ISEPath = process.env.windir + '\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe';
26- var ISEPath = 'C:\\Windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell_ise.exe' ;
19+ var ISEPath = process . env . windir + '\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe' ;
2720
2821}
29-
30- // For testing, to be removed
31- Window . showInformationMessage ( os . arch ( ) ) ;
32- Window . showInformationMessage ( ISEPath ) ;
33-
22+
3423 require ( "child_process" ) . exec ( ISEPath + ' -NoProfile -File ' + uri . fsPath ) . unref ( ) ;
3524
3625
You can’t perform that action at this time.
0 commit comments