fix(web): bound unattended implementation turns
This commit is contained in:
@@ -11,6 +11,10 @@ const arg = (name, fallback = null) => {
|
||||
const index = process.argv.indexOf(name);
|
||||
return index >= 0 ? process.argv[index + 1] : fallback;
|
||||
};
|
||||
if (process.argv.includes("--help")) {
|
||||
process.stdout.write("usage: node tools/web/search-wbv2-batch-source.mjs [--task <task-id>] --pattern <text> [--runtime <path> ...] or --list\n");
|
||||
process.exit(0);
|
||||
}
|
||||
const task = arg("--task") ?? read("docs/EXECUTION_QUEUE.md").match(/\| 当前任务 \| `([^`]+)` \|/u)?.[1];
|
||||
const pattern = arg("--pattern");
|
||||
if (!task) throw new Error("unable to resolve current WBV2 task");
|
||||
|
||||
Reference in New Issue
Block a user