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 bash in shebangs #3570

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Use /usr/bin/env bash in shebangs #3570

merged 1 commit into from
Feb 9, 2024

Conversation

xzfc
Copy link
Contributor

@xzfc xzfc commented Feb 9, 2024

Script beginning with #!/bin/bash are failing to run on systems where bash has a different path in the FS, e.g. on NixOS.

$ ./tools/generate_openapi_models.sh
zsh: ./tools/generate_openapi_models.sh: bad interpreter: /bin/bash: no such file or directory

$ file /bin/bash
/bin/bash: cannot open `/bin/bash' (No such file or directory)

$ which bash
/run/current-system/sw/bin/bash

Replacing #!/bin/bash with #!/usr/bin/env bash fixes that.


All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@xzfc xzfc requested a review from timvisee February 9, 2024 06:38
Copy link
Member

@timvisee timvisee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@timvisee timvisee merged commit 3ad1528 into dev Feb 9, 2024
17 checks passed
@timvisee timvisee deleted the shebangs branch February 9, 2024 10:42
timvisee pushed a commit that referenced this pull request Mar 5, 2024
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