fix(approval): harden YOLO mode env parsing against quoted-bool strings

This commit is contained in:
hharry11
2026-04-27 06:42:32 +03:00
committed by Teknium
parent 158eb32686
commit 24130b7e53
5 changed files with 50 additions and 5 deletions

4
cli.py
View File

@@ -85,7 +85,7 @@ from hermes_cli.browser_connect import (
try_launch_chrome_debug,
)
from hermes_cli.env_loader import load_hermes_dotenv
from utils import base_url_host_matches
from utils import base_url_host_matches, is_truthy_value
_hermes_home = get_hermes_home()
_project_env = Path(__file__).parent / '.env'
@@ -7146,7 +7146,7 @@ class HermesCLI:
import os
from hermes_cli.colors import Colors as _Colors
current = bool(os.environ.get("HERMES_YOLO_MODE"))
current = is_truthy_value(os.environ.get("HERMES_YOLO_MODE"))
if current:
os.environ.pop("HERMES_YOLO_MODE", None)
_cprint(