feat(backend): support container runtime paths

This commit is contained in:
2026-07-11 21:32:33 +02:00
parent a0daa319ca
commit c6c00c336a
9 changed files with 144 additions and 38 deletions
+4
View File
@@ -6,6 +6,7 @@ export interface ThtConfig {
thtBin: string;
harnessDir: string;
configPath: string;
dataRoot?: string;
}
export interface SessionRow {
@@ -61,8 +62,11 @@ export class ThtRunner {
run(args: string[], workspace?: string): Promise<{ code: number; stdout: string; stderr: string }> {
return new Promise((resolve) => {
const env: NodeJS.ProcessEnv = { ...process.env };
if (this.cfg.dataRoot !== undefined) env.THT_DATA_ROOT = this.cfg.dataRoot;
const ch = spawn(this.cfg.thtBin, this.buildArgv(args, workspace), {
cwd: this.cfg.harnessDir,
env,
});
let stdout = "";
let stderr = "";