Skip to content

Commit 2ac8a25

Browse files
committed
Fix AppVeyor build Restore task failure
1 parent 4e60081 commit 2ac8a25

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

vscode-powershell.build.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ task ResolveEditorServicesPath -Before Clean, Build {
2929
}
3030
}
3131

32-
task Restore -If { "Restore" -in $BuildTasks -or !(Test-Path "./node_modules") } -Before Build {
33-
Write-Host "`n### Restoring vscode-powershell dependencies, this could take a while`n" -ForegroundColor Green
34-
exec { & npm install }
32+
task Restore -If { "Restore" -in $BuildTask -or !(Test-Path "./node_modules") } -Before Build {
33+
Write-Host "`n### Restoring vscode-powershell dependencies`n" -ForegroundColor Green
34+
35+
# When in a CI build use the --loglevel=error parameter so that
36+
# package install warnings don't cause PowerShell to throw up
37+
$logLevelParam = if ($env:AppVeyor) { "--loglevel=error" } else { "" }
38+
exec { & npm install $logLevelParam }
3539
}
3640

3741
task Clean {

0 commit comments

Comments
 (0)