Skip to content

Use system-neutral /usr/bin/env bash instead of /bin/bash  #87

Open

Description

@charud

Is there a reason that #!/bin/bash is used here

#!/bin/bash

instead of #!/usr/bin/env bash which would avoid the error
error: cannot run .git/hooks/pre-commit: No such file or directory that users could get who does not have bash in /bin.

Has there been any discussion around this?

Activity

  1. gilligan commented on Dec 20, 2016

    @gilligan

    I wanted to suggest the same - I am using NixOS and I do not have a /bin/bash at all. I would suggest to just us /bin/sh because that is the bare minimum which always has exist.

  2. vith commented on Jun 21, 2017

    @vith

    Same problem here on NixOS.

    A PR to fix this has been opened at #105 by @tassmjau.

  3. ItsDrike commented on Sep 16, 2024

    @ItsDrike

    So, it seems that this has been fixed in the source code (that PR is now merged), but there wasn't a new release made in 8 years, so it's still not on NPM... Could a new release be made?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions