Skip to content

/usr/local/bin not in PATH for git hooks #14319

@gilbitron

Description

@gilbitron

The problem

I have a pre-commit git hook with a Docker command like:

docker compose exec -T -u ...

When trying to commit files in GitHub Desktop I get an error from the hook "docker: command not found". Committing files from the command line works fine. On further investigation, it looks like /usr/local/bin is missing from my PATH when git hooks run from GitHub Desktop. Any ideas how to resolve this?

Release version

2.9.12 (arm64)

Operating system

macOS

Steps to reproduce the behavior

No response

Log files

No response

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions