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

[Suggestion] Improve shell detection #247

Closed
89luca89 opened this issue Apr 28, 2022 · 5 comments · Fixed by NixOS/nixpkgs#175302
Closed

[Suggestion] Improve shell detection #247

89luca89 opened this issue Apr 28, 2022 · 5 comments · Fixed by NixOS/nixpkgs#175302
Labels
enhancement New feature or request

Comments

@89luca89
Copy link
Owner

Right now shell detection is based on the $SHELL variable

This works generally except for /bin/ash which is not a standalone package, but is provided by busybox

Let's try and find a way to install the desired SHELL without resorting to hardcoding anything

@89luca89 89luca89 added the enhancement New feature or request label Apr 28, 2022
@nathanchance
Copy link
Contributor

Isn't this really only a problem for ash? Every other shell that I can think of is a standalone package with the shell's name on most distributions; for example, Arch Linux has a whole wiki page on shells and it seems like all of them are the name of the shell from what I can tell.

Perhaps there could be a helper function like get_shell_package so that ash can be mapped to busybox, along with any other weird ones that might come up?

@89luca89
Copy link
Owner Author

I imagine is just for ash, I'd like to keep it as simple as possible, so it could even be a single if ash then busybox thing if it's an isolated case
Else we could resort to the pkg managers builtin search to do stuff, but I doubt that every one out there has a provides command like dnf for example

@89luca89
Copy link
Owner Author

In the end I just inserted a quirk for it, not worth wasting too much time on it

@PureTryOut
Copy link

Does this now run busybox? That won't work, it'll need to be busybox sh.

@89luca89
Copy link
Owner Author

Does this now run busybox? That won't work, it'll need to be busybox sh.

Nono, it just sets the package name to install to busybox
It leaves the shell to ash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants