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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user