Skip to content

fix(banner): prefer installed repo path in check_for_updates - #6330

Closed
zerone0x wants to merge 1 commit into
NousResearch:mainfrom
zerone0x:fix/6319-update-check-repo-path
Closed

fix(banner): prefer installed repo path in check_for_updates#6330
zerone0x wants to merge 1 commit into
NousResearch:mainfrom
zerone0x:fix/6319-update-check-repo-path

Conversation

@zerone0x

@zerone0x zerone0x commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #6319

check_for_updates() in hermes_cli/banner.py preferred ~/.hermes/hermes-agent over the project root. When a user installs from source at a different location and a stale clone lives at ~/.hermes/hermes-agent, hermes --version perpetually reported "N commits behind" even after updating the live checkout.

This patch resolves the repo directory against the project root (where __file__ lives) first, and only falls back to ~/.hermes/hermes-agent when the project root isn't a git checkout (e.g. pip-installed wheel). Minimal change, preserves existing caching and fetch behavior.

Previously check_for_updates preferred ~/.hermes/hermes-agent, which
caused 'N commits behind' to be reported indefinitely when that path
was a stale clone separate from the repo the user actually runs from.
Resolve against the project root (where __file__ lives) first, and
only fall back to ~/.hermes/hermes-agent when the project root is not
a git checkout.

Fixes #6319
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competes with #7303 and #4424 — same banner update-check path bug. Maintainer should pick one.

@zerone0x

Copy link
Copy Markdown
Contributor Author

Thanks, confirmed the overlap:

Since neither related PR is merged/closed as the chosen fix, I am leaving this open for maintainer selection. No code update is needed here unless maintainers want this variant adjusted.

@zerone0x zerone0x closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: check_for_updates reports stale 'commits behind' when ~/.hermes/hermes-agent exists as a separate repo

2 participants