gabriel / muse public
fix minor fix/whoami-global-config #1 / 1
gabriel · 67 days ago · Apr 10, 2026 · Diff

fix: get_hub_url falls back to ~/.muse/config.toml when no repo config found

muse auth whoami (and any other hub-aware command) was failing with 'No hub URL provided' when invoked without --hub outside a repo, even when the user had set [hub] url in ~/.muse/config.toml after keygen/register.

Root cause: get_hub_url() only checked <repo>/.muse/config.toml (via _config_path()) and returned None immediately if no hub section was found, ignoring the global user config entirely.

Fix: after checking the repo-local config, fall back to _GLOBAL_CONFIG_FILE (~/.muse/config.toml). Repo-local config still takes precedence.

Regression tests added in TestWhoamiGlobalConfigFallback: - test_whoami_reads_hub_from_global_config: whoami succeeds outside a repo when global config has [hub] url - test_whoami_global_config_fallback_not_used_when_repo_config_present: repo config takes precedence over global config

sha256:3463f547792154c4104d876b254bbac0510a0c935bde39d102614c225effe23a sha
sha256:3d1d9da129f2e46dedc35619e1234a754bc609e9cc9e2630f25c6c3e554228a1 snapshot
← Older Oldest on fix/whoami-global-config
All commits
Newer → Latest on fix/whoami-global-config

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:3463f547792154c4104d876b254bbac0510a0c935bde39d102614c225effe23a --body "your comment"