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

Don't hardcode the path for bash #1086

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

YtvwlD
Copy link
Contributor

@YtvwlD YtvwlD commented Dec 23, 2023

Some systems (eg. NixOS) don't have it in /bin.

Some systems (eg. NixOS) don't have it in /bin.
@kevinaboos
Copy link
Member

Ah, good point! Do all systems have /usr/bin/env though? I thought /bin was the most common.

@YtvwlD
Copy link
Contributor Author

YtvwlD commented Dec 23, 2023

Most of them apparently? I failed to find an authoritative source (this is the best I could come up with), but most modern systems seem to have it either in /usr/bin or in both places. Notable exceptions seem to be "SCO OpenServer (…) and Cray Unicos", but I've never heard of them before.

@kevinaboos
Copy link
Member

Cool, I also looked into it and it seems that using env is okay, especially in this scenario because bash wouldn't suffer from different versioning issues like python and other interpreters might.

Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

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

Thanks!

@kevinaboos kevinaboos merged commit 813015b into theseus-os:theseus_main Dec 23, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 23, 2023
Some systems (e.g., NixOS) don't have `/bin/bash`,
so use the `env` utility to locate `bash` instead. 813015b
@YtvwlD YtvwlD deleted the bash-path branch December 23, 2023 19:08
github-actions bot pushed a commit to tsoutsman/Theseus that referenced this pull request Dec 27, 2023
Some systems (e.g., NixOS) don't have `/bin/bash`,
so use the `env` utility to locate `bash` instead. 813015b
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