jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.8k stars 232 forks source link

/usr/bin/env: ‘bash’: No such file or directory #1544

Open marioanticoli opened 6 months ago

marioanticoli commented 6 months ago

Describe the bug On cd-ing into a dir that requests Elixir it outputs the following error:

/usr/bin/env: ‘bash’: No such file or directory
mise Error listing bin paths for elixir@1.15.5-otp-26: command ["/home/mario/.local/share/mise/plugins/elixir/bin/list-bin-paths"] exited with code 127

and the path is not updated with the Elixir's executables.

To Reproduce

.tool_versions

erlang 26.0.2
elixir 1.15.5-otp-26

.mise.toml

[env]
ERL_AFLAGS = "-kernel shell_history enabled"
EX_WARNINGS_AS_ERRORS = "false"

Expected behavior I'd expect the execs to be available (mix, iex, elixir, elixirc) and no warnings

mise doctor output

mise version:
  2024.1.30 linux-x64 (3a195bc 2024-01-27)

build:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Sat, 27 Jan 2024 01:04:29 +0000
  Rust Version: rustc 1.75.0 (82e1608df 2023-12-21)
  Profile: release

shell:
  /bin/bash
  GNU bash, version 5.2.21(1)-release (x86_64-redhat-linux-gnu)
  Copyright (C) 2022 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

mise data directory:
  /home/mario/.local/share/mise

mise environment variables:
  MISE_SHELL=bash

settings:
  {
    "activate_aggressive": true,
    "all_compile": false,
    "always_keep_download": false,
    "always_keep_install": false,
    "asdf_compat": false,
    "cargo_binstall": true,
    "color": true,
    "disable_default_shorthands": false,
    "disable_tools": [],
    "experimental": false,
    "jobs": 4,
    "legacy_version_file": true,
    "legacy_version_file_disable_tools": [],
    "node_compile": false,
    "not_found_auto_install": true,
    "paranoid": false,
    "plugin_autoupdate_last_check_duration": "7d",
    "python_compile": false,
    "python_default_packages_file": "/home/mario/.default-python-packages",
    "python_patch_url": null,
    "python_precompiled_os": null,
    "python_patches_directory": null,
    "python_precompiled_arch": null,
    "python_pyenv_repo": "https://github.com/pyenv/pyenv.git",
    "python_venv_auto_create": false,
    "raw": false,
    "shorthands_file": null,
    "status": {
      "missing_tools": true,
      "show_env": false,
      "show_tools": false
    },
    "task_output": null,
    "trusted_config_paths": [],
    "quiet": false,
    "verbose": false,
    "yes": false,
    "ci": false,
    "cd": null,
    "debug": false,
    "env_file": null,
    "trace": false,
    "log_level": "info"
  }

config files:
  ~/.config/mise/config.toml
  ~/work/.mise.toml
  ~/work/fcm/.tool-versions
  ~/work/fcm/.mise.toml

plugins:
  bun      (core)
  deno     (core)
  elixir   https://github.com/mise-plugins/mise-elixir.git#7b06439
  go       (core)
  java     (core)
  neovim   https://github.com/richin13/asdf-neovim.git#0b7b611
  node     (core)
  python   (core)
  ruby     (core)

/usr/bin/env: ‘bash’: No such file or directory
mise Error listing bin paths for elixir@1.15.5-otp-26: command ["/home/mario/.local/share/mise/plugins/elixir/bin/list-bin-paths"] exited with code 127
toolset:
  erlang@26.0.2, elixir@1.15.5-otp-26, node@18.17.1, ruby@3.1.0

No problems found

Additional context

As a workaround I changed the shebang to /bin/bash, it solves the error with path (but not the one with install).

jdx commented 6 months ago

what is your PATH? can you execute /usr/bin/env bash?

marioanticoli commented 6 months ago

outside of mise's dir PATH is

/home/mario/.local/bin:/home/mario/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin

while inside, with the workaround

/home/mario/.cache/rebar3/bin:/home/mario/.local/share/mise/installs/erlang/26.0.2/bin:/home/mario/.local/share/mise/installs/elixir/1.15.5-otp-26/bin:/home/mario/.local/share/mise/installs/elixir/1.15.5-otp-26/.mix/escripts:/home/mario/.local/share/mise/installs/node/18.17.1/bin:/home/mario/.local/share/mise/installs/ruby/3.1.0/bin:/home/mario/.local/bin:/home/mario/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin

When running /usr/bin/env bash, it seems to open a subshell

image

PS I have starship enabled, but even when not loading it I have the same problem.