diff --git a/scripts/Install-VSCode.ps1 b/scripts/Install-VSCode.ps1 index 27aaf3aaa6..51b8e48fe4 100644 --- a/scripts/Install-VSCode.ps1 +++ b/scripts/Install-VSCode.ps1 @@ -458,6 +458,11 @@ if (($IsLinux -or $IsMacOS) -and (id -u) -ne 0) { 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" } +# User builds can only be installed on Windows systems +if ($BuildEdition.EndsWith('User') -and $os -ne 'Windows') { + throw 'User builds are not available for non-Windows systems' +} + try { $prevProgressPreference = $ProgressPreference $ProgressPreference = 'SilentlyContinue'