Files
bare-operating-system/scripts/run-bin-prelude.mjs
T
Raven Scott ff9ab499a2 New tooling
Entry: scripts/run-bin.mjs
Preload shim (must load first): scripts/run-bin-prelude.mjs
Harness: scripts/lib/run-bin-harness.mjs

Usage:

node scripts/run-bin.mjs ls -la /bin
node scripts/run-bin.mjs cat /etc/passwd
node scripts/run-bin.mjs --cmd sed -n '1,5p' /home/user/note.txt
node scripts/run-bin.mjs --json echo "hello"
printf 'a\nb\n' | node scripts/run-bin.mjs cat
npm run test:coreutils -- --suite basic
npm run test:coreutils -- --build --watch -- echo test   # rebuild + watch src/<cmd>.js (use `--buil
2026-04-27 21:32:50 -04:00

13 lines
443 B
JavaScript

/**
* Must be imported before any other repo imports so Host Node matches
* brittle-node / test:booter:shell (bare-type, bare-dns, require.addon, …).
*/
import { createRequire } from 'node:module'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const dir = path.dirname(fileURLToPath(import.meta.url))
createRequire(import.meta.url)(
path.join(dir, '../packages/bare-os-booter/scripts/bare-node-test-shim.cjs')
)