Skip to content

fix: stop spinner before re-raising Ctrl+C and guard GitHub-only feat… - #122

Merged
Huerte merged 1 commit into
mainfrom
fix/ctrl-c-spinner-loop-and-github-guards
Aug 7, 2026
Merged

fix: stop spinner before re-raising Ctrl+C and guard GitHub-only feat…#122
Huerte merged 1 commit into
mainfrom
fix/ctrl-c-spinner-loop-and-github-guards

Conversation

@Huerte

@Huerte Huerte commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactor / internal

Changes

  • executor.py: wrap subprocess.run in its own try/except KeyboardInterrupt so the yaspin spinner is stopped before the interrupt is re-raised. This was causing a ghost spinner to re-appear after Ctrl+C in any command.
  • pull.py, jump.py, undo.py: removed loading_msg and ok_text from run_command calls inside interrupt cleanup functions. Cleanup paths don't need a spinner.
  • link.py: replaced hardcoded ensure_github_known_host() with get_remote_host(url)ensure_known_host(host). SSH check now targets the actual remote host, not always github.com. Works for GitLab, Gitea, self-hosted, etc.
  • init.py: _parse_template_slug now checks if the URL points to a non-GitHub host and raises a clear error instead of letting the GitHub API call fail mid-download.
  • repo.py: added an upfront info() line at the start of repo_operation so users know this command is GitHub-specific before anything runs.

Checklist

  • Tested locally and changes work as expected
  • CHANGELOG.md updated under [Unreleased]
  • README.md updated (if a command was added or changed)
  • Tests added or updated (if applicable)
  • No existing commands are broken (if they are, describe the impact above)

@Huerte
Huerte merged commit 4ee5fbc into main Aug 7, 2026
9 checks passed
@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pygitgo/utils/executor.py 50.00% 3 Missing ⚠️
src/pygitgo/commands/init.py 66.66% 1 Missing ⚠️
src/pygitgo/commands/undo.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants