Xcode git commit fails when running git hooks

Viewed 304

Recently I've started using git hooks for my project, to run a script before committing, and I usually commit from Xcode's git client when reviewing the changes, but now with the pre-commit hooks Xcode thinks the commit failed, when my scripts are executing correctly.

enter image description here

Is there a way to tell Xcode that the scripts finished successfully, or just mute it and let the commit go through? Committing with the hooks works through the terminal and through Fork (GUI git client)

P.S.: The commit still succeeds, its just Xcode thinks it doesn't. Checking the repo again shows the files as committed.

1 Answers

I was able to prevent the dialog by removing all prints for the success flow.

I noticed another odd behaviour while debugging: Xcode seems to only reload the git-hook file content after a restart.

Related