Skip to content

Conversation

@lachiemurray
Copy link
Contributor

Summary

Some OSs (for example NisOS) don't have /bin/bash by default. Meaning that all hook scripts will currently fail to run. A more universal approach would be to use /usr/bin/env bash. It still requires bash but doesn't require it to be present in the /bin directory.

Details

Might be nice for the choice of interpreter to be configurable but that would go beyond the scope of what I'm trying to solve (to get it working by default on NixOS)

How it was tested

Not explicitly

Impacted documentation

I didn't see anything relevant under: https://rushjs.io/pages/maintainer/git_hooks/

Update shebang line in hook file to use env bash.
@lachiemurray lachiemurray marked this pull request as ready for review December 11, 2025 20:31
@lachiemurray
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Enode"

@iclanton iclanton enabled auto-merge (squash) December 17, 2025 19:24
@iclanton iclanton merged commit dc482e6 into microsoft:main Dec 17, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants