mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-12 06:00:25 +00:00
fix: deduplicate isInteractiveTTY and remove dead OVH env wrapper (#1457)
- Export isInteractiveTTY from commands.ts and import in index.ts, removing the duplicate definition that was missing !! boolean coercion - Remove unused inject_env_vars_ovh function from ovh/lib/common.sh (all OVH scripts use spawn_agent which calls _spawn_inject_env_vars) - Bump CLI version to 0.5.6 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
930adeecb6
commit
bc83ab0559
4 changed files with 3 additions and 13 deletions
|
|
@ -1682,7 +1682,7 @@ function renderListTable(records: SpawnRecord[], manifest: Manifest | null): voi
|
|||
console.log();
|
||||
}
|
||||
|
||||
function isInteractiveTTY(): boolean {
|
||||
export function isInteractiveTTY(): boolean {
|
||||
return !!(process.stdin.isTTY && process.stdout.isTTY);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import {
|
|||
resolveAgentKey,
|
||||
resolveCloudKey,
|
||||
loadManifestWithSpinner,
|
||||
isInteractiveTTY,
|
||||
} from "./commands.js";
|
||||
import pc from "picocolors";
|
||||
import pkg from "../package.json" with { type: "json" };
|
||||
|
|
@ -28,10 +29,6 @@ import { loadManifest, agentKeys, cloudKeys, getCacheAge } from "./manifest.js";
|
|||
|
||||
const VERSION = pkg.version;
|
||||
|
||||
function isInteractiveTTY(): boolean {
|
||||
return process.stdin.isTTY && process.stdout.isTTY;
|
||||
}
|
||||
|
||||
function handleError(err: unknown): never {
|
||||
// Use duck typing instead of instanceof to avoid prototype chain issues
|
||||
const msg = err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue