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

toolbox enter: run shell in container via /usr/bin/env <shell-name> instead of using $SHELL directly #1431

Open
ghost opened this issue Dec 23, 2023 · 3 comments · May be fixed by #1432
Open
Labels
1. Feature request A request for a new feature

Comments

@ghost
Copy link

ghost commented Dec 23, 2023

Is your feature request related to a problem? Please describe.

When using the toolbox enter command to launch the shell in a container, it currently directly uses the $SHELL variable. This can lead to a problem when it can't find shell in container in certain environments, particularly in NixOS host where $SHELL is usually formatted as /run/current-system/sw/bin/<shell-name>. (or something like /usr/local/bin/<shell-name>, ~/.local/bin/<shell-name>)

Describe the solution you'd like

Get shell name from $SHELL and run shell via /usr/bin/env <shell-name>.

Describe alternatives you've considered

Running toolbox enter with SHELL=/usr/bin/fish.

@ghost ghost added the 1. Feature request A request for a new feature label Dec 23, 2023
@ghost
Copy link
Author

ghost commented Dec 23, 2023

PR: #1432

@ghost ghost changed the title toolbox enter: run shell in container via /usr/bin/env <shell-name> instead of using $SHELL directly toolbox enter: run shell in container via /usr/bin/env <shell-name> instead of using $SHELL directly Dec 23, 2023
@debarshiray
Copy link
Member

Interesting. Is this enough to get Toolbx working on NixOS hosts?

I remember that in the past there were problems getting Toolbx to work on NixOS, but I lost track of those.

@ghost
Copy link
Author

ghost commented Feb 1, 2024

Is this enough to get Toolbx working on NixOS hosts?

Looks like? Currently, Toolbox just works (ignoring this issue) on my NixOS 23.11 (but AFAIK you need to enable podman support in NixOS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Feature request A request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant