bun-safe
Version:
Run scripts using Bun.js and perhaps install Bun first if necessary.
24 lines • 471 B
JavaScript
import { bunSafe } from "./index.mjs";
const exit = (() => {
let FINISHED = false;
function wait() {
if (!FINISHED) setTimeout(wait);
}
wait();
return code => {
FINISHED = true;
process.exit(code);
};
})();
const args = process.argv.slice(2);
if (!args.length) throw new Error('Received empty arguments');
try {
bunSafe(args, {
stdio: 'inherit'
});
exit(0);
} catch (e) {
exit(1);
}
//# sourceMappingURL=bin.mjs.map