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:
A 2026-02-18 22:54:47 -08:00 committed by GitHub
parent 930adeecb6
commit bc83ab0559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 13 deletions

View file

@ -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);
}

View file

@ -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);