mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 04:17:11 +00:00
fix(ui): initialize colors early for consistent status output
Call initUI() at the start of main() to ensure chalk is loaded before any status messages. Previously, colors only worked when an update notification was displayed because showUpdateNotification() was the only place calling initUI(). Fixes #201
This commit is contained in:
@@ -255,6 +255,13 @@ async function main(): Promise<void> {
|
||||
const args = process.argv.slice(2);
|
||||
const firstArg = args[0];
|
||||
|
||||
// Initialize UI colors early to ensure consistent colored output
|
||||
// Must happen before any status messages (ok, info, fail, etc.)
|
||||
if (process.stdout.isTTY && !process.env['CI']) {
|
||||
const { initUI } = await import('./utils/ui');
|
||||
await initUI();
|
||||
}
|
||||
|
||||
// Trigger update check early for ALL commands except version/help/update
|
||||
// Only if TTY and not CI to avoid noise in automated environments
|
||||
const skipUpdateCheck = [
|
||||
|
||||
Reference in New Issue
Block a user