cross-platform bun bd (#24983)

closes #24969
This commit is contained in:
Michael H
2025-11-24 10:09:43 +11:00
committed by GitHub
parent ddcec61f59
commit f31db64bd4
4 changed files with 27 additions and 2 deletions

13
scripts/bd Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
LOG_FILE="${TMPDIR:-/tmp}/bun.debug.build.log.$$"
if bun run --silent build:debug > "$LOG_FILE" 2>&1; then
rm -f "$LOG_FILE"
exec ./build/debug/bun-debug "$@"
else
status=$?
cat "$LOG_FILE"
rm -f "$LOG_FILE"
exit "$status"
fi

2
scripts/bd.bat Normal file
View File

@@ -0,0 +1,2 @@
@echo off
pwsh -File "%~dp0bd.ps1" %*

10
scripts/bd.ps1 Normal file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env pwsh
$buildOutput = & bun run --silent build:debug 2>&1
if ($LASTEXITCODE -ne 0) {
Write-Output $buildOutput
exit $LASTEXITCODE
}
& ./build/debug/bun-debug @args
exit $LASTEXITCODE