rorybyrne / git-plan

Git Plan - a better workflow for git
MIT License
182 stars 5 forks source link

[Bug] `RuntimeError` is raised when not in a git repository #79

Closed rorybyrne closed 3 years ago

rorybyrne commented 3 years ago

Describe the bug

When running git-plan or gp outside of a git repository, a RuntimeError is shown with a stack trace.

To Reproduce

Steps to reproduce the behavior:

  1. pip install git-plan
  2. git-plan list (in a directory without a .git/ directory)

Expected behavior

A useful error message should be shown.

There is already a NotAGitRepository Exception in the stack trace, so we should just catch that in the right place and display an error message.

JBizarri commented 3 years ago

@synek I just opened PR #80