A Hermes process whose HERMES_HOME, LOCALAPPDATA or USERPROFILE override
points at a throwaway folder (a review preview, a lab run, a test home)
prepended that folder's bin to the real HKCU User PATH during dependency
sync and update. Every console opened afterwards ran the sandbox's
launcher.
expose_cli and the update-tail PATH migration now ask Windows for the
environment a new console receives (CreateEnvironmentBlock, which ignores
this process's environment). They edit the User PATH only when that
environment resolves the same Hermes root, and leave it alone when Windows
cannot say. Other homes still publish launchers into their own bin.
hermes_root_for_environment resolves the root from a given environment and
shares its root rules with get_default_hermes_root. It expands %NAME%,
${NAME}, $NAME and a leading ~ from that environment alone, so a sandbox
that inherits a stored HERMES_HOME such as %LOCALAPPDATA%\data and
overrides LOCALAPPDATA does not match the console's root. The environment
block reader advances by UTF-16 units, so a stored value holding an emoji
does not hide the variables after it.
430 lines
20 KiB
Python
430 lines
20 KiB
Python
"""expose_cli — the launcher owner repairs PATH conveniences.
|
|
|
|
The installers write ~/.local/bin/hermes* once, at install time. This
|
|
step rewrites them when they drift (moved checkout, recreated venv,
|
|
deleted by hand) and — just as load-bearing — REFUSES to touch a
|
|
launcher that belongs to a different install sharing the link dir.
|
|
Real files under a temp HOME; no mocks of the things being tested.
|
|
|
|
The wrapper-writing surface is POSIX-only by design (Windows exposure is
|
|
installer-owned), so the behaviour tests skip on win32 and the win32
|
|
gate gets its own test.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from hermes_cli import _launchers, post_update
|
|
|
|
posix_only = pytest.mark.platforms("posix")
|
|
|
|
|
|
def _write_bundled_stamp(repo_root: Path) -> None:
|
|
"""The minimal install-stamp.json this branch accepts as a bundled
|
|
payload (payload marker + a valid updateMechanism)."""
|
|
repo_root.mkdir(parents=True, exist_ok=True)
|
|
(repo_root / "install-stamp.json").write_text(
|
|
json.dumps({"payload": "bundled", "updateMechanism": "electron-updater"}),
|
|
encoding="utf-8",
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def fake_install(tmp_path, monkeypatch):
|
|
"""A venv-shaped install root plus an isolated HOME."""
|
|
home = tmp_path / "home"
|
|
home.mkdir()
|
|
monkeypatch.setattr(Path, "home", staticmethod(lambda: home))
|
|
monkeypatch.setenv("HERMES_HOME", str(home))
|
|
|
|
root = tmp_path / "checkout"
|
|
(root / "venv" / "bin").mkdir(parents=True)
|
|
(root / "venv" / "bin" / "python").write_text("#!fake\n", encoding="utf-8")
|
|
(root / "hermes").write_text("# entrypoint\n", encoding="utf-8")
|
|
(root / "run_agent.py").write_text("# agent\n", encoding="utf-8")
|
|
monkeypatch.setenv("HERMES_INSTALL_ROOT", str(root))
|
|
store = tmp_path / "tools"
|
|
store.mkdir()
|
|
monkeypatch.setenv("HERMES_RUNTIME_DIR", str(store))
|
|
interpreter = Path(sys._base_executable).resolve()
|
|
(store / "facts.json").write_text(json.dumps({"schema": 1, "packages": {"python": {
|
|
"entry": str(interpreter.parent if os.name == "nt" else interpreter.parents[1]),
|
|
}}}), encoding="utf-8")
|
|
return home, root
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
@pytest.mark.parametrize("create", [True, False])
|
|
def test_windows_converges_on_the_installer_user_bin(create, monkeypatch, tmp_path):
|
|
"""Windows converges on the installer's convention ($HERMES_HOME\\bin + User PATH); an update
|
|
no longer skips as "installer-owned" and leaves a venv\\Scripts machine behind."""
|
|
calls = []
|
|
monkeypatch.setattr(_launchers, "_expose_windows_user_bin",
|
|
lambda root, *, create: calls.append(create) or {"ok": True, "written": []})
|
|
monkeypatch.setenv("HERMES_INSTALL_ROOT", str(tmp_path))
|
|
assert _launchers.expose_cli(create=create) == {"ok": True, "written": []}
|
|
assert calls == [create]
|
|
|
|
|
|
@pytest.fixture
|
|
def user_path_writes(monkeypatch):
|
|
"""User PATH registrations, recorded instead of written to the registry.
|
|
|
|
Launcher publication is stubbed: these tests cover only the registration
|
|
decision, and publication has its own tests."""
|
|
registered = []
|
|
monkeypatch.setattr(_launchers, "ensure_install_launchers",
|
|
lambda root, out: [str(out / f"{name}.exe") for name in _launchers.WINDOWS_BIN_LAUNCHERS])
|
|
monkeypatch.setattr(_launchers, "_register_windows_user_path",
|
|
lambda entry: registered.append(Path(entry)) or "added")
|
|
return registered
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
def test_sandbox_home_keeps_its_launchers_off_the_user_path(user_path_writes, tmp_path, monkeypatch):
|
|
"""A review sandbox's HERMES_HOME publishes into its own bin and never reaches the User PATH.
|
|
|
|
The console environment is not stubbed: Windows builds it from the user's
|
|
stored variables, so these overrides are exactly what a sandbox sets."""
|
|
box = tmp_path / "box"
|
|
monkeypatch.setenv("HERMES_HOME", str(box / "hermes"))
|
|
monkeypatch.setenv("LOCALAPPDATA", str(box / "local"))
|
|
monkeypatch.setenv("USERPROFILE", str(box / "user"))
|
|
|
|
result = _launchers._expose_windows_user_bin(tmp_path / "checkout", create=True)
|
|
|
|
assert result["ok"] and result["skipped"]
|
|
assert result["written"] == [f"{name}.exe" for name in _launchers.WINDOWS_BIN_LAUNCHERS]
|
|
assert user_path_writes == []
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
@pytest.mark.parametrize("hermes_home", [None, ("hermes",), ("hermes", "profiles", "work")])
|
|
def test_the_home_new_consoles_use_registers_its_bin(user_path_writes, hermes_home, tmp_path, monkeypatch):
|
|
local = tmp_path / "local"
|
|
monkeypatch.setenv("LOCALAPPDATA", str(local))
|
|
if hermes_home is None:
|
|
monkeypatch.delenv("HERMES_HOME", raising=False)
|
|
else:
|
|
monkeypatch.setenv("HERMES_HOME", str(local.joinpath(*hermes_home)))
|
|
monkeypatch.setattr(_launchers, "_new_console_environment", lambda: {"LOCALAPPDATA": str(local)})
|
|
|
|
result = _launchers._expose_windows_user_bin(tmp_path / "checkout", create=True)
|
|
|
|
assert result["path"] == "added"
|
|
assert user_path_writes == [local / "hermes" / "bin"]
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
@pytest.mark.parametrize("stored_home, override", [
|
|
("%LOCALAPPDATA%\\hermes-data", "LOCALAPPDATA"),
|
|
("~\\hermes-data", "USERPROFILE"),
|
|
])
|
|
def test_inherited_home_reference_expands_from_the_console_environment(
|
|
user_path_writes, stored_home, override, tmp_path, monkeypatch):
|
|
"""A sandbox that inherits a stored HERMES_HOME such as %LOCALAPPDATA%\\x and overrides
|
|
LOCALAPPDATA resolves a different root from a new console, so it must not match."""
|
|
real = tmp_path / "real"
|
|
console = {"LOCALAPPDATA": str(real / "local"), "USERPROFILE": str(real / "user"), "HERMES_HOME": stored_home}
|
|
monkeypatch.setattr(_launchers, "_new_console_environment", lambda: dict(console))
|
|
monkeypatch.setenv("LOCALAPPDATA", console["LOCALAPPDATA"])
|
|
monkeypatch.setenv("USERPROFILE", console["USERPROFILE"])
|
|
monkeypatch.setenv("HERMES_HOME", stored_home)
|
|
monkeypatch.setenv(override, str(tmp_path / "box" / override.lower()))
|
|
|
|
result = _launchers._expose_windows_user_bin(tmp_path / "checkout", create=True)
|
|
|
|
assert result["skipped"]
|
|
assert user_path_writes == []
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
def test_unknown_console_environment_leaves_the_user_path(user_path_writes, tmp_path, monkeypatch):
|
|
monkeypatch.setenv("LOCALAPPDATA", str(tmp_path / "local"))
|
|
monkeypatch.delenv("HERMES_HOME", raising=False)
|
|
monkeypatch.setattr(_launchers, "_new_console_environment", lambda: None)
|
|
|
|
assert _launchers._expose_windows_user_bin(tmp_path / "checkout", create=True)["skipped"]
|
|
assert user_path_writes == []
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
def test_new_console_environment_ignores_this_process(tmp_path, monkeypatch):
|
|
"""The real Win32 read: variables set only in this process are absent from a new console's environment."""
|
|
monkeypatch.setenv("LOCALAPPDATA", str(tmp_path / "local"))
|
|
monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes"))
|
|
monkeypatch.setenv("HERMES_TEST_ONLY_IN_THIS_PROCESS", "1")
|
|
|
|
environ = _launchers._new_console_environment()
|
|
|
|
assert environ is not None
|
|
assert "HERMES_TEST_ONLY_IN_THIS_PROCESS" not in environ
|
|
assert environ.get("LOCALAPPDATA")
|
|
assert Path(environ["LOCALAPPDATA"]) != tmp_path / "local"
|
|
assert environ.get("HERMES_HOME") != str(tmp_path / "hermes")
|
|
|
|
|
|
@pytest.mark.platforms("windows")
|
|
def test_environment_block_reader_counts_utf16_units():
|
|
"""An emoji takes two UTF-16 units but one Python character; the variables after it must survive."""
|
|
import ctypes
|
|
|
|
block = ctypes.create_unicode_buffer("A=1\0MOOD=\U0001F600\0HERMES_HOME=C:\\h\0=C:=C:\\\0\0")
|
|
|
|
assert _launchers._read_environment_block(ctypes.addressof(block)) == {
|
|
"A": "1", "MOOD": "\U0001F600", "HERMES_HOME": "C:\\h"}
|
|
|
|
|
|
def test_registered_as_a_home_step():
|
|
assert ("expose_cli", _launchers.expose_cli) in post_update.HOME_STEPS
|
|
|
|
|
|
class TestExposeCli:
|
|
@posix_only
|
|
@pytest.mark.parametrize("hermes", ["missing", "foreign"])
|
|
def test_repair_only_preserves_missing_and_foreign_commands(self, fake_install, monkeypatch, hermes):
|
|
home, root = fake_install
|
|
monkeypatch.setattr("hermes_cli.config.load_config", lambda: pytest.fail("repair read config"))
|
|
wrapper_dir = home / ".local" / "bin"
|
|
extra = home / "bin"
|
|
assert _launchers.expose_cli(create=False) == {"ok": True, "written": []}
|
|
assert not wrapper_dir.exists()
|
|
assert not extra.exists()
|
|
assert {p.name for p in (root / ".hermes/bin").iterdir()} == set(_launchers.ENTRY_POINTS)
|
|
|
|
# An owned ACP entry must be repaired even without an owned hermes
|
|
# sibling admitting this directory. Its old target is already gone.
|
|
extra.mkdir()
|
|
dangling = root / "venv/bin/hermes-acp"
|
|
acp = extra / "hermes-acp"
|
|
acp.symlink_to(dangling)
|
|
assert not acp.exists() and acp.is_symlink()
|
|
foreign = b"#!/bin/sh\n# user-owned caf\xc3\xa9 command\nexit 19\n"
|
|
if hermes == "foreign":
|
|
(extra / "hermes").write_bytes(foreign)
|
|
wrapper_dir.mkdir(parents=True)
|
|
(wrapper_dir / "hermes").write_bytes(foreign)
|
|
foreign_link = wrapper_dir / "hermes-acp"
|
|
foreign_target = home / "other-install/hermes-acp"
|
|
foreign_link.symlink_to(foreign_target)
|
|
before = {path: path.lstat().st_mtime_ns for path in (wrapper_dir, wrapper_dir / "hermes", foreign_link)}
|
|
|
|
assert _launchers.expose_cli(create=False) == {"ok": True, "written": ["hermes-acp"]}
|
|
assert acp.is_file() and not acp.is_symlink() and os.access(acp, os.X_OK)
|
|
assert not dangling.exists()
|
|
assert not (extra / "hermes-agent").exists()
|
|
assert not (wrapper_dir / "hermes-agent").exists()
|
|
if hermes == "foreign":
|
|
assert (extra / "hermes").read_bytes() == foreign
|
|
else:
|
|
assert not (extra / "hermes").exists()
|
|
assert (wrapper_dir / "hermes").read_bytes() == foreign
|
|
assert foreign_link.is_symlink() and foreign_link.readlink() == foreign_target
|
|
assert before == {path: path.lstat().st_mtime_ns for path in before}
|
|
assert _launchers.expose_cli(create=False) == {"ok": True, "written": []}
|
|
|
|
@posix_only
|
|
def test_writes_all_three_wrappers_fresh(self, fake_install):
|
|
home, root = fake_install
|
|
result = _launchers.expose_cli()
|
|
assert result["ok"] is True
|
|
assert sorted(result["written"]) == ["hermes", "hermes-acp", "hermes-agent"]
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
wrapper = home / ".local" / "bin" / name
|
|
body = wrapper.read_text(encoding="utf-8-sig")
|
|
assert str(root) in body
|
|
assert str(root / ".hermes" / "bin") in body
|
|
assert os.access(wrapper, os.X_OK)
|
|
|
|
|
|
|
|
@posix_only
|
|
def test_leaves_another_installs_wrapper_alone(self, fake_install):
|
|
home, _root = fake_install
|
|
other = "/somewhere/else/checkout"
|
|
wrapper_dir = home / ".local" / "bin"
|
|
wrapper_dir.mkdir(parents=True)
|
|
foreign = f'#!/bin/sh\nexec "{other}/venv/bin/python" "{other}/hermes" "$@"\n'
|
|
(wrapper_dir / "hermes").write_text(foreign, encoding="utf-8")
|
|
result = _launchers.expose_cli()
|
|
assert (wrapper_dir / "hermes").read_text(encoding="utf-8-sig") == foreign
|
|
assert "hermes" not in result["written"]
|
|
# The other two had no file at all — those ARE written.
|
|
assert sorted(result["written"]) == ["hermes-acp", "hermes-agent"]
|
|
|
|
@posix_only
|
|
def test_config_gate_disables(self, fake_install, monkeypatch):
|
|
monkeypatch.setattr(
|
|
"hermes_cli.config.load_config",
|
|
lambda: {"cli": {"expose_on_path": False}},
|
|
)
|
|
result = _launchers.expose_cli()
|
|
assert result == {"ok": True, "skipped": "config-disabled"}
|
|
|
|
@posix_only
|
|
def test_sealed_tree_without_venv_skips(self, fake_install, monkeypatch, tmp_path):
|
|
(tmp_path / "tools" / "facts.json").unlink()
|
|
bare = tmp_path / "sealed"
|
|
bare.mkdir()
|
|
monkeypatch.setenv("HERMES_INSTALL_ROOT", str(bare))
|
|
result = _launchers.expose_cli()
|
|
assert result == {"ok": True, "skipped": "no-store-python"}
|
|
|
|
@pytest.mark.parametrize("create", [
|
|
pytest.param(True, marks=pytest.mark.platforms("linux")),
|
|
pytest.param(False, marks=posix_only),
|
|
])
|
|
def test_bundled_tree_skips_bundle_owns_launchers(
|
|
self, fake_install, monkeypatch, tmp_path, create
|
|
):
|
|
"""The bundle owns its shims: on Linux (AppImage: transient mount)
|
|
the step names the shape and writes nothing."""
|
|
payload = tmp_path / "agent-payload"
|
|
(payload / "bin").mkdir(parents=True)
|
|
(payload / "repo").mkdir()
|
|
_write_bundled_stamp(payload / "repo")
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
(payload / "bin" / name).write_text("\x7fELF fake shim\n", encoding="utf-8")
|
|
monkeypatch.setenv("HERMES_INSTALL_ROOT", str(payload / "repo"))
|
|
if not create:
|
|
monkeypatch.setattr("hermes_cli.config.load_config", lambda: pytest.fail("repair read config"))
|
|
result = _launchers.expose_cli(create=create)
|
|
assert result == {"ok": True, "skipped": "bundle-owns-launchers"}
|
|
assert not (fake_install[0] / ".local/bin").exists()
|
|
|
|
@posix_only
|
|
def test_unstamped_tree_with_sibling_bin_is_not_a_bundle(
|
|
self, fake_install, monkeypatch, tmp_path
|
|
):
|
|
"""The stamp is the shape authority. A venv-less checkout whose
|
|
PARENT happens to carry a bin/hermes (the installers' launcher
|
|
dir shares ~/.hermes with the checkout) must skip, not enter the
|
|
sealed branch — on every platform."""
|
|
(tmp_path / "tools" / "facts.json").unlink()
|
|
parent = tmp_path / "hermes-home"
|
|
(parent / "bin").mkdir(parents=True)
|
|
(parent / "bin" / "hermes").write_text("#!/bin/sh\n# installer launcher\n", encoding="utf-8")
|
|
checkout = parent / "hermes-agent"
|
|
checkout.mkdir()
|
|
monkeypatch.setenv("HERMES_INSTALL_ROOT", str(checkout))
|
|
result = _launchers.expose_cli()
|
|
assert result == {"ok": True, "skipped": "no-store-python"}
|
|
assert _launchers._is_bundled_payload(checkout) is False
|
|
|
|
@posix_only
|
|
def test_replaces_a_dangling_symlink_from_old_installs(self, fake_install):
|
|
"""#21454: `cat >` used to follow an old symlink into the venv and
|
|
clobber the console script. The step must unlink FIRST."""
|
|
home, root = fake_install
|
|
wrapper_dir = home / ".local" / "bin"
|
|
wrapper_dir.mkdir(parents=True)
|
|
console_script = root / "venv" / "bin" / "hermes"
|
|
console_script.write_text("# real console script\n", encoding="utf-8")
|
|
(wrapper_dir / "hermes").symlink_to(console_script)
|
|
result = _launchers.expose_cli()
|
|
assert "hermes" in result["written"]
|
|
# The venv console script survives untouched…
|
|
assert console_script.read_text(encoding="utf-8-sig") == "# real console script\n"
|
|
# …and the link-dir entry is now a real file, not a symlink.
|
|
assert not (wrapper_dir / "hermes").is_symlink()
|
|
|
|
|
|
@pytest.mark.platforms("macos")
|
|
def test_direct_packaged_cli_exposes_shims_before_electron(tmp_path):
|
|
import subprocess
|
|
import shlex
|
|
|
|
home = tmp_path / "home"
|
|
home.mkdir()
|
|
payload = tmp_path / "Hermes.app/Contents/Resources/agent-payload"
|
|
repo = payload / "repo"
|
|
_write_bundled_stamp(repo)
|
|
(repo / "install-stamp.json").write_text(json.dumps({
|
|
"payload": "bundled", "commit": "abcdef012345", "updateMechanism": "electron-updater",
|
|
}), encoding="utf-8")
|
|
bin_dir = payload / "bin"
|
|
bin_dir.mkdir()
|
|
code = f"import sys; sys.path.insert(0, {str(Path(__file__).resolve().parents[2])!r}); from hermes_cli.main import main; main()"
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
shim = bin_dir / name
|
|
shim.write_text(f'#!/bin/sh\nexec {shlex.join([sys.executable, "-I", "-c", code])} "$@"\n', encoding="utf-8")
|
|
shim.chmod(0o755)
|
|
env = dict(os.environ, HOME=str(home), HERMES_HOME=str(home / ".hermes"),
|
|
HERMES_INSTALL_ROOT=str(repo), HERMES_RUNTIME_DIR=str(tmp_path / "tools"))
|
|
# Execute the package CLI directly. No Electron process or linking helper runs.
|
|
# `--help` reaches main()'s boot bootstrap (which owns expose_cli) before argparse
|
|
# exits; `--version` is answered on the pre-import fast path and never gets there.
|
|
result = subprocess.run([str(bin_dir / "hermes"), "--help"], env=env,
|
|
capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)
|
|
assert result.returncode == 0, result.stderr
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
assert (home / ".local/bin" / name).is_symlink()
|
|
assert (home / ".local/bin" / name).resolve() == bin_dir / name
|
|
|
|
|
|
@posix_only
|
|
class TestSymlinkSealedLaunchers:
|
|
"""The macOS sealed-bundle exposure helper, tested directly — the
|
|
symlink/ownership logic is platform-free; only its call site in
|
|
expose_cli is darwin-gated."""
|
|
|
|
@pytest.fixture
|
|
def payload(self, tmp_path, monkeypatch):
|
|
home = tmp_path / "home"
|
|
home.mkdir()
|
|
monkeypatch.setattr(Path, "home", staticmethod(lambda: home))
|
|
payload_bin = tmp_path / "Hermes.app" / "Contents" / "Resources" / "agent-payload" / "bin"
|
|
payload_bin.mkdir(parents=True)
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
(payload_bin / name).write_text("fake mach-o shim\n", encoding="utf-8")
|
|
return home, payload_bin
|
|
|
|
def test_links_all_three_fresh(self, payload):
|
|
home, payload_bin = payload
|
|
result = _launchers._symlink_sealed_launchers(payload_bin)
|
|
assert result["ok"] is True
|
|
assert sorted(result["written"]) == ["hermes", "hermes-acp", "hermes-agent"]
|
|
for name in ("hermes", "hermes-agent", "hermes-acp"):
|
|
link = home / ".local" / "bin" / name
|
|
assert link.is_symlink()
|
|
assert os.readlink(link) == str(payload_bin / name)
|
|
|
|
def test_second_run_is_a_no_op(self, payload):
|
|
_, payload_bin = payload
|
|
_launchers._symlink_sealed_launchers(payload_bin)
|
|
result = _launchers._symlink_sealed_launchers(payload_bin)
|
|
assert result["written"] == []
|
|
|
|
def test_retargets_own_link_after_app_moved(self, payload, tmp_path):
|
|
"""An app update / move leaves ~/.local/bin pointing at the old
|
|
bundle path INSIDE this payload tree — that link is ours; retarget."""
|
|
home, payload_bin = payload
|
|
old = payload_bin.parent / "bin-old"
|
|
link_dir = home / ".local" / "bin"
|
|
link_dir.mkdir(parents=True)
|
|
(link_dir / "hermes").symlink_to(old / "hermes") # dangling, old payload path
|
|
result = _launchers._symlink_sealed_launchers(payload_bin)
|
|
assert "hermes" in result["written"]
|
|
assert os.readlink(link_dir / "hermes") == str(payload_bin / "hermes")
|
|
|
|
def test_never_touches_a_live_foreign_entry(self, payload, tmp_path):
|
|
home, payload_bin = payload
|
|
link_dir = home / ".local" / "bin"
|
|
link_dir.mkdir(parents=True)
|
|
# A real file (pipx-style launcher)…
|
|
(link_dir / "hermes").write_text("#!/bin/sh\n# pipx launcher\n", encoding="utf-8")
|
|
# …and a live symlink to a different tool.
|
|
other = tmp_path / "other-tool"
|
|
other.write_text("other\n", encoding="utf-8")
|
|
(link_dir / "hermes-agent").symlink_to(other)
|
|
result = _launchers._symlink_sealed_launchers(payload_bin)
|
|
assert (link_dir / "hermes").read_text(encoding="utf-8-sig") == "#!/bin/sh\n# pipx launcher\n"
|
|
assert os.readlink(link_dir / "hermes-agent") == str(other)
|
|
assert sorted(result["written"]) == ["hermes-acp"]
|