Aller au contenu
login
arrow_backRetour aux issues
fu351/Doberman-Core #429

cli: `install-hooks --dry-run` previews `doberman dashboard`, but writes `doberman session-summary`

ecoDébutant bug good first issue level-2

descriptionDescription

The dry-run preview for `install-hooks` and `uninstall-hooks` is hardcoded (`src/doberman/cli/main.py:1701` and `:1860`: `typer.echo(" SessionStart -> doberman dashboard")`). What the installer actually writes to the host's settings file is `DASHBOARD_COMMAND = "doberman session-summary"` (`src/doberman/hosthooks/install.py:32`); `dashboard` survives only as a hidden alias. So the preview that exists to show people exactly what will be written shows the wrong command. Reproduce: `doberman install-hooks --dry-run --path ` prints `SessionStart -> doberman dashboard`. **What to do** 1. Import `DASHBOARD_COMMAND` from `doberman.hosthooks.install` in `main.py` and use it in both echo lines (an f-string), so the preview can never drift from the write path again. 2. Extend `tests/unit/test_install_hooks.py` with a dry-run assertion: output contains `doberman session-summary` and not `doberman dashboard`. If a dry-run test already exists there, add the assertion to it. 3. `pytest tests/unit/test_install_hooks.py` green. Display text only; the merge logic already uses the constant.
codeOuvre sur GitHub