Closed oleynikandrey closed 1 month ago
Hey! Did it work before? What changed? Did you change your shell environment somehow? With which Zed version did it work?
I have just installed it and played with it for a while. At first, it seemed to be working, but I cannot say for sure.
What do you get when you run the following in a terminal?
env -i HOME="$HOME" /bin/zsh -i -l -c 'cd ~/; /usr/bin/env' | grep PATH
I'm getting the following error
➜ ~ env -i HOME="$HOME" /bin/zsh -i -l -c 'cd ~/; /usr/bin/env' | grep PATH
Could not open a connection to your authentication agent.
I found the cause of the problem. I had the zellij
command at the bottom of my .zshrc
file, and it was interfering with the command that was used to get the value of the PATH
variable.
if [[ -z "$ZELLIJ" && -z "$ZELLIJ_DISABLED" ]]; then
if [[ "$ZELLIJ_AUTO_ATTACH" == "true" ]]; then
zellij attach -c
else
zellij
fi
if [[ "$ZELLIJ_AUTO_EXIT" == "true" ]]; then
exit
fi
fi
Huh! Interesting. So if you remove that it works?
Yes
You could try modifying the script the check whether stdout/stdin/stderr are a terminal and only then start zellij:
if [[ -z "$ZELLIJ" ]] && [[ -z "$ZELLIJ_DISABLED" ]] && [[ -t 0 ]] && [[ -t 1 ]] && [[ -t 2 ]]; then
if [[ "$ZELLIJ_AUTO_ATTACH" == "true" ]]; then
zellij attach -c
else
zellij
fi
if [[ "$ZELLIJ_AUTO_EXIT" == "true" ]]; then
exit
fi
fi
With this condition env -i HOME="$HOME" /bin/zsh -i -l -c 'cd ~/; /usr/bin/env'
still runs zellij
, but I see not errors inZed
logs.
With this condition
env -i HOME="$HOME" /bin/zsh -i -l -c 'cd ~/; /usr/bin/env'
still runszellij
, but I see not errors inZed
logs.
Yeah, but that has a terminal attached to it :) What I meant was that you could modify the script and then try it in Zed again. Because in Zed, there is no TTY attached to stdin/stdout/stderr, so zellij shouldn't be started.
Check for existing issues
Describe the bug / provide steps to reproduce it
Zed 0.147.2 became broken somehow. It could not install gopls because it was unable to parse the output of the
env
command.Environment
Apple M1 Max Sonoma Version 14.6.1 (23G93) Shell ZSH (oh-my-zsh)
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log