@@ -77,7 +77,7 @@ suite("Platform module", () => {
7777
7878 checkDefaultPowerShellPath (
7979 platformDetails ,
80- platform . SysnativePowerShellPath ) ;
80+ "C:\\Program Files\\PowerShell\\6\\pwsh.exe" ) ;
8181
8282 checkAvailableWindowsPowerShellPaths (
8383 platformDetails ,
@@ -107,7 +107,7 @@ suite("Platform module", () => {
107107
108108 checkDefaultPowerShellPath (
109109 platformDetails ,
110- platform . System32PowerShellPath ) ;
110+ "C:\\Program Files\\PowerShell\\6\\pwsh.exe" ) ;
111111
112112 checkAvailableWindowsPowerShellPaths (
113113 platformDetails ,
@@ -118,4 +118,86 @@ suite("Platform module", () => {
118118 } ,
119119 ] ) ;
120120 } ) ;
121+ if ( process . platform === "win32" ) {
122+ suite ( "64-bit Windows, 64-bit VS Code" , ( ) => {
123+ const platformDetails : platform . IPlatformDetails = {
124+ operatingSystem : platform . OperatingSystem . Windows ,
125+ isOS64Bit : true ,
126+ isProcess64Bit : true ,
127+ } ;
128+
129+ checkDefaultPowerShellPath (
130+ platformDetails ,
131+ platform . System32PowerShellPath ) ;
132+
133+ checkAvailableWindowsPowerShellPaths (
134+ platformDetails ,
135+ [
136+ {
137+ versionName : platform . WindowsPowerShell64BitLabel ,
138+ exePath : platform . System32PowerShellPath ,
139+ } ,
140+ {
141+ versionName : platform . WindowsPowerShell32BitLabel ,
142+ exePath : platform . SysWow64PowerShellPath ,
143+ } ,
144+ ] ) ;
145+
146+ checkFixedWindowsPowerShellpath (
147+ platformDetails ,
148+ platform . SysnativePowerShellPath ,
149+ platform . System32PowerShellPath ) ;
150+ } ) ;
151+
152+ suite ( "64-bit Windows, 32-bit VS Code" , ( ) => {
153+ const platformDetails : platform . IPlatformDetails = {
154+ operatingSystem : platform . OperatingSystem . Windows ,
155+ isOS64Bit : true ,
156+ isProcess64Bit : false ,
157+ } ;
158+
159+ checkDefaultPowerShellPath (
160+ platformDetails ,
161+ "C:\\Program Files\\PowerShell\\6\\pwsh.exe" ) ;
162+
163+ checkAvailableWindowsPowerShellPaths (
164+ platformDetails ,
165+ [
166+ {
167+ versionName : platform . WindowsPowerShell64BitLabel ,
168+ exePath : platform . SysnativePowerShellPath ,
169+ } ,
170+ {
171+ versionName : platform . WindowsPowerShell32BitLabel ,
172+ exePath : platform . System32PowerShellPath ,
173+ } ,
174+ ] ) ;
175+
176+ checkFixedWindowsPowerShellpath (
177+ platformDetails ,
178+ platform . SysWow64PowerShellPath ,
179+ platform . System32PowerShellPath ) ;
180+ } ) ;
181+
182+ suite ( "32-bit Windows, 32-bit VS Code" , ( ) => {
183+ const platformDetails : platform . IPlatformDetails = {
184+ operatingSystem : platform . OperatingSystem . Windows ,
185+ isOS64Bit : false ,
186+ isProcess64Bit : false ,
187+ } ;
188+
189+ checkDefaultPowerShellPath (
190+ platformDetails ,
191+ "C:\\Program Files\\PowerShell\\6\\pwsh.exe" ) ;
192+
193+ checkAvailableWindowsPowerShellPaths (
194+ platformDetails ,
195+ [
196+ {
197+ versionName : platform . WindowsPowerShell32BitLabel ,
198+ exePath : platform . System32PowerShellPath ,
199+ } ,
200+ ] ) ;
201+ } ) ;
202+ }
121203} ) ;
0 commit comments