Add configurable verbosity and guarded shell tracing

This commit is contained in:
Shivam Mathur
2026-09-09 12:19:28 +05:30
parent 63b8b6feda
commit 250924180e
12 changed files with 568 additions and 35 deletions
+18
View File
@@ -28,6 +28,18 @@ Function Add-Log($mark, $subject, $message) {
}
}
# Function to run sensitive code without tracing. Expand tokens inside the script block.
Function Invoke-WithoutTrace([scriptblock]$Script) {
Set-PSDebug -Off
$previous_trace = $setup_php_trace
$setup_php_trace = 0
try {
& $Script
} finally {
Set-PSDebug -Trace $previous_trace
}
}
# Function to set output on GitHub Actions.
Function Set-Output() {
param(
@@ -333,6 +345,12 @@ $nightly_versions = '8.[6-9]'
$xdebug3_versions = "7.[2-4]|8.[0-9]"
$enable_extensions = ('openssl', 'curl', 'mbstring')
$setup_php_trace = 0
if ($env:SETUP_PHP_TRACE -match '^[12]$') {
$setup_php_trace = [int]$env:SETUP_PHP_TRACE
Set-PSDebug -Trace $setup_php_trace
}
$arch = 'x64'
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
$arch = 'x86'