Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use /usr/bin/env to find bash #2599

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

abhillman
Copy link
Contributor

@abhillman abhillman commented Nov 18, 2023

Before submitting your pull request

  • I agree to license my code under the MPL 2.0 license.
  • I rebased my work on top of the main branch.
  • I ran npm test and all tests passed.
  • I added test coverages if relevant.

Description

This enables npm test to successfully call scripts in bin/ with the bash binary specified by PROFILE.


Additional information:

In addition to potentially preferring an alternative version of bash than the one in /bin/bash, some distributions forego storing bash in bin/ at all, such as NixOS:

$ cat /etc/os-release | rg '^NAME=' -r ''
NixOS
$ which bash
/run/current-system/sw/bin/bash

Type of change

Select all that apply.

  • Bug fix
  • New feature
  • Major change (fix or feature that would cause existing functionality to work differently than in the current version)

Tag issues related to this pull request:

  • n/a

Related pull requests:

This enables `npm test` to successfully call scripts in `bin/` with
the `bash` binary specified by `PROFILE`.

---

Additional information:

In addition to potentially preferring an alternative version of bash
than the one in `/bin/bash`, some distributions forego storing bash in
`bin/` at all, such as `NixOS`:

```bash
$ cat /etc/os-release | rg '^NAME=' -r ''
NixOS
$ which bash
/run/current-system/sw/bin/bash
```
@dannycolin dannycolin self-assigned this Nov 29, 2023
@dannycolin dannycolin self-requested a review November 29, 2023 00:48
@dannycolin dannycolin removed their assignment Nov 29, 2023
@dannycolin
Copy link
Collaborator

Definitely agree with the portability argument so LGTM. Thanks for your contribution :).

@dannycolin dannycolin merged commit 018b458 into mozilla:main Nov 29, 2023
2 checks passed
@abhillman abhillman deleted the abhillman/shebang-bash-with-env branch December 9, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants