You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If git is not installed or isn't in the user's PATH, diff-quality fails with an error that non-technical (SQLFluff, other?) users find confusing:
$ diff-quality --violations sqlfluff
Traceback (most recent call last):
File "/app/.venv/bin/diff-quality", line 8, in <module>
sys.exit(main())
File "/app/.venv/lib/python3.9/site-packages/diff_cover/diff_quality_tool.py", line 300, in main
GitPathTool.set_cwd(directory)
File "/app/.venv/lib/python3.9/site-packages/diff_cover/git_path.py", line 33, in set_cwd
cls._root = cls._git_root()
File "/app/.venv/lib/python3.9/site-packages/diff_cover/git_path.py", line 65, in _git_root
git_root = execute(command)[0]
File "/app/.venv/lib/python3.9/site-packages/diff_cover/command_runner.py", line 27, in execute
process = subprocess.Popen(command, stdout=stdout_pipe, stderr=stdout_pipe)
File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
Perhaps it could catch this error and print a message something like:
<<command name>> requires git to be installed and in your PATH, but it was not found.
It could also link to this page, which has instructions for installing git on various OSes.
If
git
is not installed or isn't in the user'sPATH
,diff-quality
fails with an error that non-technical (SQLFluff, other?) users find confusing:Perhaps it could catch this error and print a message something like:
It could also link to this page, which has instructions for installing git on various OSes.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
The text was updated successfully, but these errors were encountered: