Skip to content

[RFC] Scripts under .git/hooks/ may contain calls to undefined commands #617

@phansys

Description

@phansys

I have a prepare-commit-msg hook, which has #!/bin/bash as shebang. Obviously, as the container image doesn't includes bash, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions