-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Bug]: pyenv plugin (or just pathmunge?) breaks over SSH #2149
Comments
@SwampFalc I'm struggling to see how pyenv is related. When you disable that plugin, does everything else start working again? |
There are two sections in the "Current behavior" part, where I show that yes, without pyenv it works. |
@SwampFalc I see that, but the errors presented don't indicate that bash-it is the culprit. It looks like your remote host does not have the binaries needed to support pyenv. That, or your remote host is not setting up your environment properly. I created a test ubuntu virtual machine and I can ssh into it with bash-it and pyenv installed and enabled. Without being able to reproduce this, I'm at a loss. |
@cornfeedhobo just to confirm, there is no remote host, the user is ssh-ing into the very same machine (local laptop) ie Methinks some configuration causes a different bash environment when ssh-ing vs local terminal ... BUT @SwampFalc the # shellcheck shell=bash
cite about-plugin
about-plugin 'load pyenv, if you are using it'
# https://github.com/pyenv/pyenv
# Load after basher
# BASH_IT_LOAD_PRIORITY: 260
# Don't modify the environment if we can't find the tool:
# - Check if in $PATH already
# - Check if installed manually to $PYENV_ROOT
# - Check if installed manually to $HOME
_command_exists pyenv \
|| [[ -n "$PYENV_ROOT" && -x "$PYENV_ROOT/bin/pyenv" ]] \
|| [[ -x "$HOME/.pyenv/bin/pyenv" ]] \
|| return 0
# Set PYENV_ROOT, if not already set
export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
#!!!
echo "PYENV_ROOT = ${PYENV_ROOT}"
echo PATH before munge = ${PATH}"
#!!!
# Add PYENV_ROOT/bin to PATH, if that's where it's installed
if ! _command_exists pyenv && [[ -x "$PYENV_ROOT/bin/pyenv" ]]; then
pathmunge "$PYENV_ROOT/bin"
fi
#!!!
echo PATH after munge = ${PATH}"
#!!!
#!!! Maybe disabled these below lines to remove them from the equation
# Initialize pyenv
pathmunge "$PYENV_ROOT/shims"
eval "$(pyenv init - bash)"
# Load pyenv virtualenv if the virtualenv plugin is installed.
if pyenv virtualenv-init - &> /dev/null; then
eval "$(pyenv virtualenv-init - bash)"
fi |
Unfortunately, something happened between when I made the report about two months ago, and now, and the error no longer occurs. One of the things I did in the meantime was update bashit, perhaps something else fixed pathmunge? The one thing I do remember is that I did check what the path was after the error, and it was only the added pieces (ie. pyenv-related), all the basics had been dropped. Like if someone had done |
Expected behavior
When connecting to my laptop over SSH, bashit should work the same as when I open a local session.
Current behavior
With the
pyenv
plugin enabled:Without the plugin enabled:
Possible solution
I'm guessing something goes wrong in pathmunge?
Context
No response
Steps to reproduce
Bash-it version
Version type: dev Current git SHA: 2ef5d48 on 2022-05-19T00:11:54+03:00 Commit info: 2ef5d483 Compare to latest: 2ef5d48...master
List of enabled plugins, themes and aliases
Bash version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Operating system and version
Ubuntu 20.04
bash-it doctor output
Your ~/.bashrc
Notes
No response
The text was updated successfully, but these errors were encountered: