From f9e7e6c89cbb126a798a7c731a1108dd7c6ae5c1 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 25 Mar 2016 14:58:09 -0700 Subject: [PATCH] Handle `Start-PSBuild -Restore -Runtime ...` If a runtime is given, we need to restore for that particular runtime as well. This also enables `Warning` `dotnet restore` output, and increases the verbosity to `Info` if `-Verbose` is used. --- PowerShellGitHubDev.psm1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index 1d7e2dc989..555f14e007 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -119,16 +119,16 @@ function Start-PSBuild # handle Restore if ($Restore -Or -Not (Test-Path "$Top/project.lock.json")) { log "Run dotnet restore" - # restore is genuinely verbose. - # we don't show it by default to keep CI build log size small - if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) - { - dotnet restore $PSScriptRoot - } - else - { - dotnet restore $PSScriptRoot > $null - } + + $Arguments = @("--verbosity") + if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) { + $Arguments += "Info" } else { $Arguments += "Warning" } + + if ($Runtime) { $Arguments += "--runtime", $Runtime } + + $Arguments += "$PSScriptRoot" + + dotnet restore $Arguments } # Build native components