Skip to content

Commit 2846667

Browse files
committed
Added error message
Added error message when the $BuildEdition ends in User but we're on macOS or Linux. #2160 (comment)
1 parent f7095bc commit 2846667

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/Install-VSCode.ps1

+5
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ if (($IsLinux -or $IsMacOS) -and (id -u) -ne 0) {
458458
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

461+
# User builds can only be installed on Windows systems
462+
if ($BuildEdition.EndsWith('User') -and $os -ne 'Windows') {
463+
throw 'User builds are not available for non-Windows systems'
464+
}
465+
461466
try {
462467
$prevProgressPreference = $ProgressPreference
463468
$ProgressPreference = 'SilentlyContinue'

0 commit comments

Comments
 (0)