mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(cli): satisfy ruff encoding requirement in send_cmd
Specify utf-8 when reading message bodies from --file paths so the full-repo ruff enforcement check passes in CI.
This commit is contained in:
parent
290bf93104
commit
9b2d58159c
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ def _read_message_body(
|
||||||
if file_path == "-":
|
if file_path == "-":
|
||||||
return sys.stdin.read()
|
return sys.stdin.read()
|
||||||
try:
|
try:
|
||||||
return Path(file_path).read_text()
|
return Path(file_path).read_text(encoding="utf-8")
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
print(f"hermes send: cannot read {file_path}: {exc}", file=sys.stderr)
|
print(f"hermes send: cannot read {file_path}: {exc}", file=sys.stderr)
|
||||||
sys.exit(_USAGE_EXIT)
|
sys.exit(_USAGE_EXIT)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue