mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(cli): add --yes alias for skills install
Keep the argparse CLI aligned with the slash command so --yes and -y behave the same as --force for hermes skills install. Add a parser-level regression test.
This commit is contained in:
parent
3325e51e53
commit
21ad98b74c
2 changed files with 27 additions and 1 deletions
26
tests/hermes_cli/test_skills_install_flags.py
Normal file
26
tests/hermes_cli/test_skills_install_flags.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import sys
|
||||
from types import SimpleNamespace
|
||||
|
||||
|
||||
def test_cli_skills_install_accepts_yes_alias(monkeypatch):
|
||||
from hermes_cli.main import main
|
||||
|
||||
captured = {}
|
||||
|
||||
def fake_skills_command(args):
|
||||
captured["identifier"] = args.identifier
|
||||
captured["force"] = args.force
|
||||
|
||||
monkeypatch.setattr("hermes_cli.skills_hub.skills_command", fake_skills_command)
|
||||
monkeypatch.setattr(
|
||||
sys,
|
||||
"argv",
|
||||
["hermes", "skills", "install", "official/email/agentmail", "--yes"],
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
assert captured == {
|
||||
"identifier": "official/email/agentmail",
|
||||
"force": True,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue