2024-06-19 13:57:12 +01:00
|
|
|
import consts, { BASE_PATH } from "../consts.ts";
|
|
|
|
import * as path from "jsr:@std/path";
|
2024-06-19 13:31:31 +01:00
|
|
|
import { checkAndInstallLune, EXE_EXTENSION } from "../install.ts";
|
|
|
|
|
|
|
|
// Install lune, if unavailable
|
|
|
|
await checkAndInstallLune();
|
|
|
|
|
|
|
|
// Wrap around the lune executable
|
|
|
|
/*
|
|
|
|
dnt does not support Deno.Command yet, but once they do, this would
|
|
|
|
like so:
|
|
|
|
|
2024-06-19 13:57:12 +01:00
|
|
|
new Deno.Command(path.join(BASE_PATH, "lune" + EXE_EXTENSION), {
|
2024-06-19 13:31:31 +01:00
|
|
|
args: Deno.args,
|
|
|
|
stdout: "inherit",
|
|
|
|
stderr: "inherit",
|
|
|
|
stdin: "inherit",
|
|
|
|
}).spawn();
|
|
|
|
*/
|
|
|
|
// deno-lint-ignore no-deprecated-deno-api
|
|
|
|
const luneStatus = await Deno.run({
|
2024-06-19 14:08:00 +01:00
|
|
|
cmd: [
|
|
|
|
path.join(BASE_PATH, consts.version, "lune" + EXE_EXTENSION),
|
|
|
|
...Deno.args,
|
|
|
|
],
|
|
|
|
stdout: "inherit",
|
|
|
|
stderr: "inherit",
|
|
|
|
stdin: "inherit",
|
2024-06-19 13:57:12 +01:00
|
|
|
}).status();
|
2024-06-19 13:31:31 +01:00
|
|
|
|
2024-06-19 13:57:12 +01:00
|
|
|
Deno.exit(luneStatus.signal);
|