fix(test): stop FORCE_COLOR/CCAM_COLOR leaking into spawned ccam CLI children
The sandbox's ambient FORCE_COLOR=3 was inherited by every ccam-cli.test.js child process spawn, defeating the CLI's own "colors off when piped" default and breaking every plain-text output assertion (help text, piped output, offline-mode rendering).
This commit is contained in:
@@ -29,6 +29,12 @@ process.env.DASHBOARD_DB_PATH = path.join(TMP, "dashboard.db");
|
||||
process.env.CLAUDE_HOME = path.join(TMP, "home");
|
||||
process.env.DASHBOARD_DATA_DIR = path.join(TMP, "data");
|
||||
process.env.DASHBOARD_LIVENESS_PROBE = "0";
|
||||
// Every spawn below inherits `process.env` — a shell that forces color
|
||||
// (FORCE_COLOR/CCAM_COLOR set in the environment running this test) would
|
||||
// leak into the spawned CLI child and defeat its own "colors off when piped"
|
||||
// behavior, which every plain-text assertion in this file assumes.
|
||||
delete process.env.FORCE_COLOR;
|
||||
delete process.env.CCAM_COLOR;
|
||||
|
||||
const { createApp, startServer } = require("../index");
|
||||
const { db } = require("../db");
|
||||
|
||||
Reference in New Issue
Block a user