mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-27 03:46:23 +08:00
Change default of Start-PSBuild
to include -PSModuleRestore
(#7881)
This commit is contained in:
parent
8f6bbdf11e
commit
abaf18680a
10
build.psm1
10
build.psm1
@ -196,7 +196,7 @@ function Test-IsPreview
|
||||
}
|
||||
|
||||
function Start-PSBuild {
|
||||
[CmdletBinding()]
|
||||
[CmdletBinding(DefaultParameterSetName="Default")]
|
||||
param(
|
||||
# When specified this switch will stops running dev powershell
|
||||
# to help avoid compilation error, because file are in use.
|
||||
@ -207,7 +207,10 @@ function Start-PSBuild {
|
||||
[switch]$ResGen,
|
||||
[switch]$TypeGen,
|
||||
[switch]$Clean,
|
||||
[Parameter(ParameterSetName="Legacy")]
|
||||
[switch]$PSModuleRestore,
|
||||
[Parameter(ParameterSetName="Default")]
|
||||
[switch]$NoPSModuleRestore,
|
||||
[switch]$CI,
|
||||
|
||||
# this switch will re-build only System.Management.Automation.dll
|
||||
@ -238,6 +241,11 @@ function Start-PSBuild {
|
||||
[string]$ReleaseTag
|
||||
)
|
||||
|
||||
if ($PsCmdlet.ParameterSetName -eq "Default" -and !$NoPSModuleRestore)
|
||||
{
|
||||
$PSModuleRestore = $true
|
||||
}
|
||||
|
||||
if ($Runtime -eq "linux-arm" -and -not $Environment.IsUbuntu) {
|
||||
throw "Cross compiling for linux-arm is only supported on Ubuntu environment"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user