-
Notifications
You must be signed in to change notification settings - Fork 43
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
[RFC] Scripts under .git/hooks/
may contain calls to undefined commands
#617
Comments
Hmm, hooks should not be executed when using Gush as local operations are only done to bypass some API limitations. Is there no command option in Git to skip/disable this for the operation? Edit. Typo. |
yeah the problem is with the commands that are not in there, but this could include any tools and be any commands so i don't think you can include satisfactorily all cases here. The only gush commands that commit are when rebasing or a minimum set. I think you should use git on local for using your hooks and then just use gush for the main api stuff. |
@cordoval , the RFC is about how to address the situation. I think executing |
oh you mean because the hooks are not seen as executables? is that what you mean? |
No @cordoval, I mean we should disable them at gush execution time (temporarily) with some mechanism that applies for all of them. I'm opening the game here in order to hear thoughts about how to achieve that goal. |
i think we should include bash to the image, are you sure it does not contain sh? |
Yes @cordoval, it contains |
I have a
prepare-commit-msg
hook, which has#!/bin/bash
as shebang. Obviously, as the container image doesn't includesbash
, it doesn't work and the merge commit is aborted.Even if in my case, the situation could be resolved adding
bash
to container dependencies, I think there could be other corner cases where commit hooks invokes commands that aren't present at the containerized gush environment.How we could proceed in front of these scenarios? I can imagine just a possible solution: Check if there is any of the hooks enabled, delete them and warn the user about that limitation.
The text was updated successfully, but these errors were encountered: