Fix E2E Forge heading selectors and test-suite npm arg shadowing
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -25,15 +25,15 @@ function Write-Phase([string]$Name) {
|
||||
Write-Host "==============================================================" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
function Invoke-Npm([string[]]$Args) {
|
||||
function Invoke-Npm([string[]]$NpmArgs) {
|
||||
$prevEAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = 'Continue'
|
||||
try {
|
||||
$out = & npm @Args 2>&1 | ForEach-Object { "$_" }
|
||||
$out = & npm @NpmArgs 2>&1 | ForEach-Object { "$_" }
|
||||
$text = ($out -join "`n").Trim()
|
||||
if ($text) { Write-Host $text }
|
||||
if (-not $LASTEXITCODE -or $LASTEXITCODE -eq 0) { return }
|
||||
throw "npm $($Args -join ' ') failed (exit $LASTEXITCODE)"
|
||||
throw "npm $($NpmArgs -join ' ') failed (exit $LASTEXITCODE)"
|
||||
} finally {
|
||||
$ErrorActionPreference = $prevEAP
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user