Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion build.psm1
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

param(
# Skips a check that prevents building PowerShell on unsupported Linux distributions
[parameter(Mandatory = $false)][switch]$SkipLinuxDistroCheck = $false
)

Set-StrictMode -Version 3.0

# On Unix paths is separated by colon
Expand Down Expand Up @@ -178,7 +183,11 @@ function Get-EnvironmentInformation
$environment.IsSUSEFamily -or
$environment.IsAlpine)
) {
throw "The current OS : $($LinuxInfo.ID) is not supported for building PowerShell."
if ($SkipLinuxDistroCheck) {
Write-Warning "The current OS : $($LinuxInfo.ID) is not supported for building PowerShell."
} else {
throw "The current OS : $($LinuxInfo.ID) is not supported for building PowerShell. Import this module with '-ArgumentList `$true' to bypass this check."
}
}
}

Expand Down