-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
commitlint throws python stack error if commit message file not present.
Steps to Replicate:
commitlint --file /non-existent/file
Observed Behaviour:
Traceback (most recent call last):
File "/Users/aj3sh/.venv/test/bin/commitlint", line 8, in <module>
sys.exit(main())
File "/Users/aj3sh/projects/python/commitlint/src/commitlint/cli.py", line 210, in main
commit_message = _get_commit_message_from_file(args.file)
File "/Users/aj3sh/projects/python/commitlint/src/commitlint/cli.py", line 139, in _get_commit_message_from_file
with open(abs_filepath, encoding="utf-8") as commit_message_file:
FileNotFoundError: [Errno 2] No such file or directory: '/non-existent/file'
Expected Behaviour:
A valid message should be shown in this case.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done