Skip to content

Commit

Permalink
Added error message
Browse files Browse the repository at this point in the history
Added error message when the $BuildEdition ends in User but we're on macOS or Linux.
#2160 (comment)
  • Loading branch information
Lothindir committed Sep 2, 2019
1 parent f7095bc commit 2846667
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/Install-VSCode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2846667

Please sign in to comment.