Add final packages and fix torrential launch

This commit is contained in:
DecDuck
2026-03-30 19:47:53 +11:00
parent f05b306b38
commit 50106d5fa2
7 changed files with 422 additions and 215 deletions
@@ -49,9 +49,9 @@ export class TorrentialService extends Service<unknown> {
super(
"torrential",
() => {
const localDir = fs.readdirSync(".");
if (localDir.includes("torrential")) {
const stat = fs.statSync("./torrential");
const torrentialDir = "../torrential";
if (fs.existsSync(torrentialDir)) {
const stat = fs.statSync(torrentialDir);
if (stat.isDirectory()) {
// in dev and we have the submodule
logger.info(
@@ -62,17 +62,19 @@ export class TorrentialService extends Service<unknown> {
[
"run",
"--manifest-path",
"./torrential/Cargo.toml",
`${torrentialDir}/Cargo.toml`,
"--release",
],
{},
);
} else {
// binary
return spawn("./torrential", [], {});
}
}
const localDir = fs.readdirSync(".");
if (localDir.includes("torrential")) {
return spawn("./torrential", [], {});
}
const envPath = process.env.TORRENTIAL_PATH;
if (envPath) return spawn(envPath, [], {});