mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:50:42 +00:00
fix: use openclaw temp root for telegram live preflight
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
||||
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
||||
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
||||
import { z } from "zod";
|
||||
import { startQaGatewayChild } from "../../gateway-child.js";
|
||||
import { DEFAULT_QA_LIVE_PROVIDER_MODE } from "../../providers/index.js";
|
||||
@@ -971,7 +971,9 @@ async function runInstalledOpenClawTelegramOnboardingPreflight(params: {
|
||||
providerMode: ReturnType<typeof normalizeQaProviderMode>;
|
||||
sutToken: string;
|
||||
}) {
|
||||
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-npm-telegram-"));
|
||||
const tempRoot = await fs.mkdtemp(
|
||||
path.join(resolvePreferredOpenClawTmpDir(), "openclaw-npm-telegram-"),
|
||||
);
|
||||
const homeDir = path.join(tempRoot, "home");
|
||||
const stateDir = path.join(homeDir, ".openclaw");
|
||||
await fs.mkdir(stateDir, { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user