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

Make invocation of bash more Posix conformant. #459

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hzeller
Copy link

@hzeller hzeller commented Feb 12, 2025

Hard-coding the location of the shell to be in /bin/bash is not always working as not all Posix-conformant operating systems (such as NixOS) provide the path /bin/bash; so shell scripts won't be able to execute.

Instead, use the /usr/bin/env bash idiom to reliably find the shell to execute.

This fix is only applied to the critical scripts that might be executed on the users' machine; the _testsh scripts are left as-is.

Hard-coding the location of the shell to be in /bin/bash
is not always working as not all Posix-conformant operating
systems (such as NixOS) provide the path /bin/bash; so shell
scripts won't be able to execute.

Instead, use the `/usr/bin/env bash` idiom to reliably
find the shell to execute.

This fix is only applied to the critical scripts that might
be executed on the users' machine; the *_test*sh scripts
are left as-is.
Copy link
Member

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

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

LGTM

@jsharpe jsharpe enabled auto-merge (squash) February 12, 2025 17:33
@hzeller hzeller marked this pull request as draft February 12, 2025 17:49
auto-merge was automatically disabled February 12, 2025 17:49

Pull request was converted to draft

@hzeller
Copy link
Author

hzeller commented Feb 12, 2025

mmh, looks like this does not work in all environments as the CI complains.

Setting PR to draft for now and will try to find out what is going on.

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