fix: bun_install adds node_modules to each directory
Some checks failed
CI / test (macos-14, darwin-arm64) (push) Has been cancelled
CI / test (windows-latest, windows) (push) Has been cancelled
CI / test (ubuntu-latest, linux-x64) (push) Has been cancelled
Docs Pages / deploy (push) Failing after 42s

This commit is contained in:
eric
2026-03-06 21:44:15 +01:00
parent 49a5054b02
commit 7139aa3ba2
44 changed files with 1143 additions and 304 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
binary="$1"
workdir="$(mktemp -d)"
log_file="${workdir}/basic.log"
cleanup() {
if [[ -n ${server_pid:-} ]] && kill -0 "${server_pid}" 2>/dev/null; then
kill "${server_pid}" 2>/dev/null || true
wait "${server_pid}" 2>/dev/null || true
fi
rm -rf "${workdir}"
}
trap cleanup EXIT
"${binary}" >"${log_file}" 2>&1 &
server_pid=$!
for _ in {1..20}; do
if grep -Fq "rules_bun bun_dev example" "${log_file}"; then
exit 0
fi
if ! kill -0 "${server_pid}" 2>/dev/null; then
cat "${log_file}" >&2
echo "basic example process exited unexpectedly" >&2
exit 1
fi
sleep 0.5
done
cat "${log_file}" >&2
echo "Timed out waiting for bun_dev example output" >&2
exit 1