Skip to content

Commit bc889e8

Browse files
committed
refactor(workspace): replace colorama with Colors class in finders.py
Use the new semantic Colors class for error messages instead of raw colorama.Fore.RED. This ensures consistent color handling across the codebase and respects NO_COLOR/FORCE_COLOR environment variables.
1 parent 7867fa3 commit bc889e8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/tmuxp/workspace/finders.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import pathlib
88
import typing as t
99

10-
from colorama import Fore
11-
1210
from tmuxp._internal.private_path import PrivatePath
11+
from tmuxp.cli._colors import ColorMode, Colors
1312
from tmuxp.cli.utils import tmuxp_echo
1413
from tmuxp.workspace.constants import VALID_WORKSPACE_DIR_FILE_EXTENSIONS
1514

@@ -362,11 +361,12 @@ def find_workspace_file(
362361
]
363362

364363
if len(candidates) > 1:
364+
colors = Colors(ColorMode.AUTO)
365365
tmuxp_echo(
366-
Fore.RED
367-
+ "Multiple .tmuxp.{yml,yaml,json} workspace_files in "
368-
+ dirname(workspace_file)
369-
+ Fore.RESET,
366+
colors.error(
367+
"Multiple .tmuxp.{yml,yaml,json} workspace_files in "
368+
+ dirname(workspace_file)
369+
),
370370
)
371371
tmuxp_echo(
372372
"This is undefined behavior, use only one. "

0 commit comments

Comments
 (0)