diff options
| author | Jacob Richman <[email protected]> | 2025-06-06 07:55:28 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-06 07:55:28 -0700 |
| commit | 4262f5b0de6933c5dd475a4f081ff09e97583bfa (patch) | |
| tree | 4ec00eccb9de3ca5832c21496e7c8bd176baa4de /packages/cli/src/ui/themes/theme-manager.ts | |
| parent | c80ff146d27f0afc159456c2c40844f281bc18a8 (diff) | |
feat(cli): respect the NO_COLOR env variable (#772)
Diffstat (limited to 'packages/cli/src/ui/themes/theme-manager.ts')
| -rw-r--r-- | packages/cli/src/ui/themes/theme-manager.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/cli/src/ui/themes/theme-manager.ts b/packages/cli/src/ui/themes/theme-manager.ts index 30f1a62c..10aa53f0 100644 --- a/packages/cli/src/ui/themes/theme-manager.ts +++ b/packages/cli/src/ui/themes/theme-manager.ts @@ -17,6 +17,8 @@ import { XCode } from './xcode.js'; import { Theme, ThemeType } from './theme.js'; import { ANSI } from './ansi.js'; import { ANSILight } from './ansi-light.js'; +import { NoColorTheme } from './no-color.js'; +import process from 'node:process'; export interface ThemeDisplay { name: string; @@ -110,6 +112,9 @@ class ThemeManager { * Returns the currently active theme object. */ getActiveTheme(): Theme { + if (process.env.NO_COLOR) { + return NoColorTheme; + } return this.activeTheme; } } |
