Open Dexus opened 6 years ago
Thanks for opening this issue. However, the PR simply bypasses all logic in the cd() command.
At the moment, this appears to be a problem with your system specifically. As mentioned in the closing comment for the PR you can enable debugging by enabling the GVM_DEBUG
environment variable.
Also keep in mind that GVM2 is in use on different shells (notably bash and zsh) with all sorts of different customizations by the end user. Try to isolate the cause of a problem with your specific configuration. Other packages (notably rvm
) may override the cd()
command as well and GVM2 does it's best to work around that challenge.
Finally, it's unlikely that a PR will be accepted without test coverage.
Hi @markeissler
can you now tell me what is wrong?
~ # GVM_DEBUG=1 cd Dokumente/
Resolving defaults...
Resolved default go: go1.9.2
Resolved default pkgset: global
No .go-version found. Using system or default go.
Parsing __gvm_use() argument: --quiet
Parsing __gvm_use() argument: go1.9.2
Command (use.sh) options dump:
[--quiet]: true
[--version]: go1.9.2
Command (use.sh) installed versions dump:
[go1.4]: /home/josef/.gvm/gos/go1.4
[go1.7.6]: /home/josef/.gvm/gos/go1.7.6
[go1.8.5]: /home/josef/.gvm/gos/go1.8.5
[go1.9.2]: /home/josef/.gvm/gos/go1.9.2
[system]: /home/josef/.gvm/gos/go1.9.1
Original path: /home/josef/.gvm/pkgsets/go1.9.2/global/bin:/home/josef/.gvm/gos/go1.9.2/bin:/home/josef/.gvm/pkgsets/go1.9.2/global/overlay/bin:/home/josef/.gvm/bin:/home/josef/.gvm/bin:/home/josef/.nvm/versions/node/v8.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
Munged path: /home/josef/.gvm/pkgsets/go1.9.2/global/bin:/home/josef/.gvm/gos/go1.9.2/bin:/home/josef/.gvm/pkgsets/go1.9.2/global/overlay/bin:/home/josef/.gvm/bin:/home/josef/.nvm/versions/node/v8.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
No .go-pkgset found. Using system or default pkgset.
Parsing __gvm_pkgset_use() argument: --quiet
Parsing __gvm_pkgset_use() argument: global
Command (pkgset_use.sh) options dump:
[--quiet]: true
[--pkgset]: global
Original path: /home/josef/.gvm/pkgsets/go1.9.2/global/bin:/home/josef/.gvm/gos/go1.9.2/bin:/home/josef/.gvm/pkgsets/go1.9.2/global/overlay/bin:/home/josef/.gvm/bin:/home/josef/.gvm/bin:/home/josef/.nvm/versions/node/v8.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
Munged path: /home/josef/.gvm/pkgsets/go1.9.2/global/bin:/home/josef/.gvm/gos/go1.9.2/bin:/home/josef/.gvm/pkgsets/go1.9.2/global/overlay/bin:/home/josef/.gvm/bin:/home/josef/.nvm/versions/node/v8.9.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
I will not join my Dokumente
dir.... so it must a bug ...
I use bash as shell.
Which shell are you using? bash or zsh?
Provide the output for the following commands...
prompt> declare -f cd | head
...
prompt> declare -f __gvm_oldcd
From the DEBUG output we can see that the gvm cd() command has been loaded, is being called, is working to resolve which go version to use and which pkgset to use. These steps all occur after gvm has changed to your target directory (Dokumente).
Is the Dokumente path a symbolic link? Have you tried specifying the full path to the directory?
There is something odd about your installation: the system go is pointing to a version that's controlled by gvm (normally, the path to the system go would be in /usr/local/bin). This suggests that gvm was re-installed at some point while .gvm/gos/go1.9.1
was in your PATH.
One approach you could try is to perform a clean install:
1. Backup your `.gvm` directory:
promp> mv $HOME/.gvm $HOME/.gvm.orig
2. Edit your .profile/.zlogin/.bashrc, etc., to comment out any reference to load gvm:
# [[ -s "/home/felix/.gvm/scripts/gvm" ]] && source "/home/felix/.gvm/scripts/gvm"
3. Exit your terminal session.
4. Open a new terminal session and install gvm.
The goal is to determine if a clean install exhibits the same behavior.
dexus@Dexus-TP:~$ declare -f cd | head
cd ()
{
unset RETVAL;
if __gvm_is_function __gvm_oldcd; then
__gvm_oldcd $*;
fi;
local dot_go_version dot_go_pkgset rslt;
local defaults_go_name defaults_go_pkgset;
local defaults_resolved=false;
local defaults_hash;
dexus@Dexus-TP:~$
dexus@Dexus-TP:~$ declare -f __gvm_oldcd
dexus@Dexus-TP:~$
thats it...
maybe this don't like to be loaded with nvm
together... dont know... but its frustration...
Hi i have the problem that my
cd directory...
not work after install gvm.Now I think the cd function is broken in
scripts/env/cd