Skip to content

Commit 63d8204

Browse files
dsolodowTylerLeonhardt
authored andcommitted
Resolve $Linux error (#1235)
* Resolve $Linux error * Update Install-VSCode.ps1 Change test for "isWindows"
1 parent 945b126 commit 63d8204

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/Install-VSCode.ps1

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#PSScriptInfo
22
3-
.VERSION 1.1
3+
.VERSION 1.2
44
55
.GUID 539e5585-7a02-4dd6-b9a6-5dd288d0a5d0
66
@@ -25,6 +25,8 @@
2525
.EXTERNALSCRIPTDEPENDENCIES
2626
2727
.RELEASENOTES
28+
20/03/2018 - fix OS detection to prevent error
29+
--
2830
28/12/2017 - added functionality to support 64-bit versions of VSCode
2931
& support for installation of VSCode Insiders Edition.
3032
--
@@ -129,7 +131,7 @@ param(
129131
[switch]$LaunchWhenDone
130132
)
131133

132-
if (!($IsLinux -or $IsOSX)) {
134+
if (($PSVersionTable.PSVersion.Major -le 5) -or $IsWindows) {
133135
switch ($Architecture) {
134136
"64-bit" {
135137
if ((Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture -eq "64-bit") {

0 commit comments

Comments
 (0)