Skip to content

git-hooks fail #2482

Description

@Joshix-1

Describe the bug
env SHELL=cat git commit -m "test" runs git-hooks correctly, but gitui with a nonstandard shell doesn't

To Reproduce
0. go to repo with pre-commit hooks

  1. env SHELL=cat gitui
  2. create a commit
  3. See error
  4. see that env SHELL=cat git commit -m "test" works

Expected behavior
git-hooks should work even with a non-standard shell.

Screenshots
image

Context (please complete the following information):

  • OS/Distro + Version: [e.g. macOS 10.15.5] Linux
  • GitUI Version [e.g. 0.5] v0.27.0
  • Rust version: [e.g 1.44] 1.83.0

Additional context
Add any other context about the problem here.
I think /bin/sh or git var GIT_SHELL_PATH should be used.
#2343 (comment)
We should probably do the same as in: GitoxideLabs/gitoxide@51bbb86

While this issue is a bit constructed, with SHELL=xonsh i have the problem that my pre-commit hooks do not get run. So this is a real problem users could be facing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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