Skip to content

raise exception instead of sys.exit #11

Open
@bertsky

Description

@bertsky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions