Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an error message when "clocking" a directory without repository. #3

Open
hohl opened this issue Jan 14, 2015 · 0 comments
Open

Comments

@hohl
Copy link

hohl commented Jan 14, 2015

I've tried to clock a directory without an git repository and got

/Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:175:in `discover': Could not find repository from '/Users/xyz/Projects/abc' (Rugged::RepositoryError)
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:175:in `get_repo'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:216:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/bin/clock:217:in `new'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/bin/clock:217:in `<top (required)>'
from /usr/bin/clock:23:in `load'
from /usr/bin/clock:23:in `<main>'

since I didn't not that I'm in the wrong directory I wondered if this a bug first. Costed me some minutes to realize whats going on. It would be very nice to catch this exception and print an error message like

ERROR: No repository found in '/Users/xyz/Projects/abc'.

Thanks for making such great tool.

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

No branches or pull requests

1 participant