aboutsummaryrefslogtreecommitdiff
path: root/bin/bnu.js
diff options
context:
space:
mode:
authorSoccera1 <[email protected]>2026-08-06 01:58:10 +1000
committerSoccera1 <[email protected]>2026-08-06 02:00:12 +1000
commitd11632d44b740ab8b78ec27544afb480f406a9d5 (patch)
tree7b56ee4e54a7858c01e1c8b4a74832e9db8eaa09 /bin/bnu.js
parent471a0af4628e4796421fdba55ebc79bb4240c47e (diff)
downloadbnu-d11632d44b740ab8b78ec27544afb480f406a9d5.tar.gz
bnu-d11632d44b740ab8b78ec27544afb480f406a9d5.zip
Automatically publish to npm
Diffstat (limited to 'bin/bnu.js')
-rwxr-xr-xbin/bnu.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/bnu.js b/bin/bnu.js
index 9d1917e..0ea480b 100755
--- a/bin/bnu.js
+++ b/bin/bnu.js
@@ -1,12 +1,10 @@
#!/usr/bin/env bun
import { realpathSync } from "node:fs";
-import { basename, dirname, join } from "node:path";
-import { pathToFileURL } from "node:url";
+import { basename } from "node:path";
+import { commandNames } from "../src/shared/catalog.js";
+import { main } from "../src/shared/runtime.js";
-const here = dirname(realpathSync(Bun.argv[1]));
globalThis[Symbol.for("bnu.cli")] = true;
-const { commandNames } = await import(pathToFileURL(join(here, "../src/shared/catalog.js")).href);
-const { main } = await import(pathToFileURL(join(here, "../src/shared/runtime.js")).href);
let invokedPath = Bun.argv[1];
try {
if (process.env._ && realpathSync(process.env._) === realpathSync(Bun.argv[1])) invokedPath = process.env._;