containers / containers/toolbox
`toolbox enter`: run shell in container via `/usr/bin/env <shell-name>` instead of using `$SHELL` directly
- Dominant language
- Go
- Stars
- 3.5k
- Forks
- 262
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Description
**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/`. (or something like `/usr/local/bin/`, `~/.local/bin/`)
**Describe the solution you'd like**
Get shell name from `$SHELL` and run shell via `/usr/bin/env `.
**Describe alternatives you've considered**
Running `toolbox enter` with `SHELL=/usr/bin/fish`.
Contributor guide
Research direction
Inspect the implementation of the `toolbox enter` command and trace how it obtains and launches `$SHELL`. Confirm the shell name is extracted and invoked through `/usr/bin/env`; done means shells whose host paths are unavailable inside the container can still start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux, shell
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100