Skip to content

"Can't infer shell" in debian:12.10 docker image #1418

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

Open
sdavids opened this issue May 1, 2025 · 0 comments
Open

"Can't infer shell" in debian:12.10 docker image #1418

sdavids opened this issue May 1, 2025 · 0 comments

Comments

@sdavids
Copy link

sdavids commented May 1, 2025

$ mkdir -p /tmp/test/.devcontainer && cd "$_/.."
$ cat <<'EOF' >.devcontainer/devcontainer.json
{
  "name": "fnm-test",
  "image": "debian:12.10",
  "features": {
    "ghcr.io/devcontainers-extra/features/apt-get-packages:1.0.7": {
      "packages": "curl,unzip"
    }
  }
}
EOF

Open /tmp/test/ in Visual Studio Code with the Visual Studio Code Dev Containers extension enabled.

Wait for the "Folder contains a Dev Container configuration file. Reopen folder to develop in a container " notification and select "Reopen in Container".

Wait for the container to be started.

Open a new terminal.

root@27081550cb70:/workspaces/test# echo $SHELL
/bin/bash
root@27081550cb70:/workspaces/test# readlink /proc/$$/exe
/usr/bin/bash
root@27081550cb70:/workspaces/test# curl -fsSL https://fnm.vercel.app/install | bash 
Checking dependencies for the installation script...
Checking availability of curl... OK!
Checking availability of unzip... OK!
Downloading https://github.com/Schniz/fnm/releases/latest/download/fnm-linux.zip...
######################################################################## 100.0%
Installing for Bash. Appending the following to /root/.bashrc:

# fnm
FNM_PATH="/root/.local/share/fnm"
if [ -d "$FNM_PATH" ]; then
  export PATH="$FNM_PATH:$PATH"
  eval "`fnm env`"
fi

In order to apply the changes, open a new terminal or run the following command:

  source /root/.bashrc
root@27081550cb70:/workspaces/test# source /root/.bashrc
error: Can't infer shell!
fnm can't infer your shell based on the process tree.
Maybe it is unsupported? we support the following shells:
* bash
* zsh
* fish
* powershell

Can be reproduced without using Dev Containers as well:

$ docker run --rm -it debian:12.10 bash
root@3240e2cf1000:/# apt-get update && apt-get install -y curl unzip
root@3240e2cf1000:/# curl -fsSL https://fnm.vercel.app/install | bash
...
root@3240e2cf1000:/# source /root/.bashrc
error: Can't infer shell!
fnm can't infer your shell based on the process tree.
Maybe it is unsupported? we support the following shells:
* bash
* zsh
* fish
* powershell
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

No branches or pull requests

1 participant