fix(capabilities): read Python exit code directly
This commit is contained in:
1 parent
c2bf5888d0
commit
9e74b9be4a
2 files changed
+14
-2
No files matched your search
@@ -0,0 +1,11 @@
|
||||
[CmdletBinding()]
|
||||
param([switch]$Summary)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
$content = Get-Content (Join-Path $root 'scripts/commands/check-capabilities.ps1') -Raw
|
||||
|
||||
if ($content -match '(?s)\(& \$python --version.*?Select-Object.*?\).*?\$LASTEXITCODE') {
|
||||
throw 'Python capability detection must not read $LASTEXITCODE after a pipeline.'
|
||||
}
|
||||
|
||||
if ($Summary) { Write-Output 'Tests: PASS | capabilities' } else { Write-Output 'PASS capabilities: Python exit code is read without a pipeline' }
|
||||
Reference in new issue
Block a user