Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default of Start-PSBuild to include -PSModuleRestore #7881

Merged
merged 2 commits into from Oct 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion build.psm1
Expand Up @@ -406,7 +406,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.
Expand All @@ -417,7 +417,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
Expand Down Expand Up @@ -448,6 +451,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"
}
Expand Down