feat: add phase 2 bun_install repository rule bootstrap

Co-authored-by: Eriyc <50216491+Eriyc@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-04 03:05:01 +00:00
parent 93a8cb4cff
commit c5cc709311
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