PEP-184: путь к bench/ вычисляется при вызове (сборка сайта)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Асель 2026-11-16 22:41:48 +05:00 committed by peppa-bot
parent d108197f0f
commit 6d4ce75ca9

View File

@ -3,7 +3,7 @@
import { execFile } from "node:child_process";
import { cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join, relative, resolve } from "node:path";
import { dirname, join, relative, resolve } from "node:path";
import { fileURLToPath } from "node:url";
/** Файлы задачи, которые агент не видит: в рабочую копию они не копируются. */
@ -64,10 +64,8 @@ export interface BenchContext {
needs?: { title: string; secret?: string | null }[];
}
const here = fileURLToPath(new URL(".", import.meta.url));
export function benchDir(): string {
return process.env.PEPPA_BENCH_DIR ? resolve(process.env.PEPPA_BENCH_DIR) : resolve(here, "../../../bench");
return process.env.PEPPA_BENCH_DIR ? resolve(process.env.PEPPA_BENCH_DIR) : resolve(dirname(fileURLToPath(import.meta.url)), "../../../bench");
}
function templateDir(): string {