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): ...@@ -1024,6 +1024,10 @@ def check(root):
# we skip sphinx build and doctests as this is run by the ci later # we skip sphinx build and doctests as this is run by the ci later
env = os.environ.copy() env = os.environ.copy()
env["SKIP"] = "sphinx-build,sphinx-doctest" 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: else:
logger.info(f"Cannot find file {path}. Skipping pre-commit checks...") 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.
Finish editing this message first!
Please register or to comment