Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print pre-commit install non-default output #1498

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,15 @@ if(GINKGO_DEVEL_TOOLS)
"Failed to install the git hooks via pre-commit. Please check the error message:\n"
"${pre-commit-output}\n${pre-commit-error}")
endif()
if(pre-commit-output MATCHES "^Running in migration mode with existing hooks")
message(WARNING
"An existing git hook was encountered during `pre-commit install`. The old git hook "
"will also be executed. Consider removing it with `pre-commit install -f`")
elseif(NOT pre-commit-output MATCHES "^pre-commit installed at")
message(WARNING
"`pre-commit install` did not exit normally. Please check the output message:\n"
"${pre-commit-output}")
MarcelKoch marked this conversation as resolved.
Show resolved Hide resolved
endif()

add_custom_target(format
COMMAND bash -c "${PRE_COMMIT} run"
Expand Down
Loading