Skip to content

Commit bf86e32

Browse files
committed
Changed the BuildEdition parameter to comply with Issue #2048
Changed Stable to Stable-System as discussed in Issue #2048 (#2048).
1 parent b696783 commit bf86e32

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

scripts/Install-VSCode.ps1

+9-9
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ param(
134134
[string]$Architecture = "64-bit",
135135

136136
[parameter()]
137-
[ValidateSet("Stable","Stable-User", "Insider-System", "Insider-User")]
138-
[string]$BuildEdition = "Stable",
137+
[ValidateSet("Stable-System","Stable-User", "Insider-System", "Insider-User")]
138+
[string]$BuildEdition = "Stable-System",
139139

140140
[Parameter()]
141141
[ValidateNotNull()]
@@ -201,7 +201,7 @@ function Get-CodePlatformInformation {
201201
$Bitness,
202202

203203
[Parameter(Mandatory=$true)]
204-
[ValidateSet('Stable', 'Stable-User', 'Insider-System', 'Insider-User')]
204+
[ValidateSet('Stable-System', 'Stable-User', 'Insider-System', 'Insider-User')]
205205
[string]
206206
$BuildEdition
207207
)
@@ -228,7 +228,7 @@ function Get-CodePlatformInformation {
228228
}
229229

230230
switch ($BuildEdition) {
231-
'Stable' {
231+
'Stable-System' {
232232
$appName = "Visual Studio Code ($Bitness)"
233233
break
234234
}
@@ -325,7 +325,7 @@ function Get-CodePlatformInformation {
325325
}
326326

327327
switch ($BuildEdition) {
328-
'Stable' {
328+
'Stable-System' {
329329
$exePath = "$installBase\Microsoft VS Code\bin\code.cmd"
330330
}
331331
'Stable-User' {
@@ -344,7 +344,7 @@ function Get-CodePlatformInformation {
344344
}
345345

346346
switch ($BuildEdition) {
347-
'Stable' {
347+
'Stable-System' {
348348
$channel = 'stable'
349349
break
350350
}
@@ -455,7 +455,7 @@ function Install-VSCodeFromTar {
455455

456456
# We need to be running as elevated on *nix
457457
if (($IsLinux -or $IsMacOS) -and (id -u) -ne 0) {
458-
throw "Must be running as root to install VSCode.`nInvoke this script with (for example):`n`tsudo pwsh -f Install-VSCode.ps1 -BuildEdition Stable"
458+
throw "Must be running as root to install VSCode.`nInvoke this script with (for example):`n`tsudo pwsh -f Install-VSCode.ps1 -BuildEdition Stable-System"
459459
}
460460

461461
try {
@@ -522,7 +522,7 @@ try {
522522
}
523523

524524
switch ($BuildEdition) {
525-
'Stable' {
525+
'Stable-System' {
526526
& $pacMan install -y code
527527
}
528528

@@ -566,7 +566,7 @@ try {
566566
break
567567
}
568568

569-
Install-VSCodeFromTar -TarPath $installerPath -Insiders:($BuildEdition -ne 'Stable')
569+
Install-VSCodeFromTar -TarPath $installerPath -Insiders:($BuildEdition -ne 'Stable-System')
570570
break
571571
}
572572

0 commit comments

Comments
 (0)