Skip to content

Commit

Permalink
Fix placement of $RestoreArguments construction
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed May 2, 2023
1 parent e90465a commit 46b4f56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ Push-Location $PSScriptRoot
try {
$HeaderColor = 'Green'

if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
$RestoreArguments = @()
if ($Interactive)
{
$RestoreArguments += '--interactive'
}
$RestoreArguments = @()
if ($Interactive)
{
$RestoreArguments += '--interactive'
}

if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
Write-Host "Restoring NuGet packages" -ForegroundColor $HeaderColor
dotnet restore @RestoreArguments
if ($lastexitcode -ne 0) {
Expand Down

0 comments on commit 46b4f56

Please sign in to comment.