feat: add phase 2 bun_install repository rule bootstrap

This commit is contained in:
Eric
2026-03-04 03:05:01 +00:00
parent dc0b26c5b5
commit dfe658763b
7 changed files with 186 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
bun_path="$1"
workdir="$(mktemp -d)"
trap 'rm -rf "${workdir}"' EXIT
cat > "${workdir}/package.json" <<'JSON'
{
"name": "clean-install-test",
"version": "1.0.0"
}
JSON
"${bun_path}" install --cwd "${workdir}" >/dev/null
rm -rf "${workdir}/node_modules"
"${bun_path}" install --cwd "${workdir}" --frozen-lockfile >/dev/null
if [[ ! -d "${workdir}/node_modules" ]]; then
echo "Expected node_modules to be created" >&2
exit 1
fi