fix(approval): harden YOLO mode env parsing against quoted-bool strings
This commit is contained in:
parent
158eb32686
commit
24130b7e53
5 changed files with 50 additions and 5 deletions
|
|
@ -17,6 +17,7 @@ from typing import Any, Optional
|
|||
|
||||
from hermes_constants import get_hermes_home
|
||||
from hermes_cli.env_loader import load_hermes_dotenv
|
||||
from utils import is_truthy_value
|
||||
from tui_gateway.transport import (
|
||||
StdioTransport,
|
||||
Transport,
|
||||
|
|
@ -3421,7 +3422,7 @@ def _(rid, params: dict) -> dict:
|
|||
enable_session_yolo(session["session_key"])
|
||||
nv = "1"
|
||||
else:
|
||||
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)
|
||||
nv = "0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue