【发布时间】:2022-01-17 22:38:13
【问题描述】:
升级到 osx Monterey 并更新 brew 后,asdf 命令在 tmux 会话中停止工作。我只使用 asdf 来管理 Node.js 和 Elixir 版本。
$asdf
未知命令:asdf
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf:第 82 行:/usr/local/opt/asdf/lib/commands/command-help.bash:没有这样的文件或目录
当我运行 tmux 会话时,asdf 命令会产生上述错误。但是,当我不使用 tmux 时,asdf 命令可以正常运行。
当我从 tmux 会话运行 which asdf 时,我应该得到一个 asdf 可执行文件的路径。相反,我得到了这个:
$ which asdf
asdf () {
local command
command="$1"
if [ "$#" -gt 0 ]
then
shift
fi
case "$command" in
("shell") eval "$(asdf export-shell-version sh "$@")" ;;
(*) command asdf "$command" "$@" ;;
esac
}
【问题讨论】: