Skip to content
Snippets Groups Projects
Commit 1269f567 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[scripts.ci] Show git differences when pre-commit fails

parent bf0a1eaa
No related branches found
No related tags found
No related merge requests found
Pipeline #52930 passed
......@@ -1024,6 +1024,10 @@ def check(root):
# we skip sphinx build and doctests as this is run by the ci later
env = os.environ.copy()
env["SKIP"] = "sphinx-build,sphinx-doctest"
run_cmdline([which("pre-commit"), "run", "--all-files"], env=env, cwd=root)
run_cmdline(
[which("pre-commit"), "run", "--all-files", "--show-diff-on-failure"],
env=env,
cwd=root,
)
else:
logger.info(f"Cannot find file {path}. Skipping pre-commit checks...")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment