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

raise exception instead of sys.exit #11

Open
bertsky opened this issue Apr 18, 2023 · 1 comment
Open

raise exception instead of sys.exit #11

bertsky opened this issue Apr 18, 2023 · 1 comment

Comments

@bertsky
Copy link

bertsky commented Apr 18, 2023

Printing and forced system exit makes it difficult to wrap this as a library, and even on the interactive interpreter it is quite a surprise to find yourself kicked out:

if checkout_dir == git_dir:
print('Can\'t checkout into a bare repo, please provide a valid '
'checkout_dir')
raise SystemExit(1)

So IMO this should simply be an assertion or exception.

@Changaco
Copy link
Member

I encourage you to make a pull request to fix this issue.

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

No branches or pull requests

2 participants