mirror of
https://github.com/paperclipai/paperclip
synced 2026-03-25 11:21:48 +00:00
fix(codex): use codexHomeDir() fallback for accurate auth detail path
When adapter config has no CODEX_HOME but process.env.CODEX_HOME is set, readCodexAuthInfo reads from the process env path. The detail message now uses codexHomeDir() instead of hardcoded "~/.codex" so the displayed path always matches where credentials were read from. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
} from "@paperclipai/adapter-utils/server-utils";
|
||||
import path from "node:path";
|
||||
import { parseCodexJsonl } from "./parse.js";
|
||||
import { readCodexAuthInfo } from "./quota.js";
|
||||
import { codexHomeDir, readCodexAuthInfo } from "./quota.js";
|
||||
|
||||
function summarizeStatus(checks: AdapterEnvironmentCheck[]): AdapterEnvironmentTestResult["status"] {
|
||||
if (checks.some((check) => check.level === "error")) return "fail";
|
||||
@@ -116,7 +116,7 @@ export async function testEnvironment(
|
||||
code: "codex_native_auth_present",
|
||||
level: "info",
|
||||
message: "Codex is authenticated via its own auth configuration.",
|
||||
detail: codexAuth.email ? `Logged in as ${codexAuth.email}.` : `Credentials found in ${codexHome ?? "~/.codex"}/auth.json.`,
|
||||
detail: codexAuth.email ? `Logged in as ${codexAuth.email}.` : `Credentials found in ${codexHome ?? codexHomeDir()}/auth.json.`,
|
||||
});
|
||||
} else {
|
||||
checks.push({
|
||||
|
||||
Reference in New Issue
Block a user