Closed steinsag closed 1 year ago
Hi @steinsag,
I've just tried replicating this and not getting that error. It seems odd that you are getting such a failure when sdkman doesn't invoke any Rust on shell initialisation. A Rust component is only invoked when you issue a command (such as sdk help
).
Here is what I did to try and replicate your issue:
$ docker run -it --rm ubuntu:22.04
# apt update && apt install -y curl zip unzip zsh
# zsh
# curl -s https://get.sdkman.io | bash
# cat /root/.zshrc
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
open a new terminal:
$ docker exec -it da1fc92 zsh
# sdk help
<sick>
Everything works fine, and it also works perfectly on my Arch Linux machine too. What happens if you remove the following obsolete line from your .zshrc
?
source <(sdk completion bash)
@steinsag Okay, I managed to replicate it when I added that line. If you remove it, the problem goes away.
Forgot to mention that I also have auto environment feature activated, which checks on each directory change.
@steinsag Okay, I managed to replicate it when I added that line. If you remove it, the problem goes away.
I can confirm that issue is resolved by removing this line. Auto environment feature seems to work as expected, too.
Great, and you will find auto completion works out of the box with ZSH too. Feel free to close the issue if you feel it answers your question.
After latest update to
on two independent Ubuntu & Kubuntu 22.04 machines, I get following error whenever I open a new zsh terminal:
When disabling sdkman in
.zshrc
, the error message disappears. I have the following in my.zshrc
file:I think the underlying problems is described in: https://github.com/rust-lang/rust/issues/24821