Skip to content

Commit

Permalink
fix: handle the file not error gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
golesuman committed May 24, 2024
1 parent 8503ef5 commit 9f61fc9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commitlint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ def main() -> None:
console.error(f"{ex}")
sys.exit(1)

except FileNotFoundError:
console.error(f"Error: The file {args.file} does not exist.")
sys.exit(1)


if __name__ == "__main__":
main() # pragma: no cover

0 comments on commit 9f61fc9

Please sign in to comment.