Skip to content
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

topgrade-rs/topgrade v13.0.0 Z4H SSH issue #287

Closed
lbonvarl opened this issue Jan 19, 2024 · 3 comments
Closed

topgrade-rs/topgrade v13.0.0 Z4H SSH issue #287

lbonvarl opened this issue Jan 19, 2024 · 3 comments

Comments

@lbonvarl
Copy link

lbonvarl commented Jan 19, 2024

I am using topgrade on an ARM64 Debian 12 VM via SSH, where Z4H is configured in shell. It seems similar to some issues experienced with other zsh configs:
r-darwish/topgrade#380
r-darwish/topgrade#394

DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Step "antibody"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Step "antidote"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Step "antigen"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Step "zgenom"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Step "zplug"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Step "zinit"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Step "zi"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Step "zim"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Executing command `zsh -c '[[ -n ${ZIM_HOME} ]] && print -n ${ZIM_HOME}'`
DEBUG Command failed: Err(
   0: Command failed: `zsh -c '[[ -n ${ZIM_HOME} ]] && print -n ${ZIM_HOME}'`
   1: `zsh` failed: exit status: 1

Location:
   /home/loic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-13.0.0/src/steps/zsh.rs:151)
DEBUG Step "oh-my-zsh"
DEBUG Detected "/usr/bin/zsh" as "zsh"
DEBUG Path "/home/loic/.zshrc" exists
DEBUG Executing command `zsh -c 'source /home/loic/.zshrc > /dev/null && export -p | grep ZSH > /dev/null && echo $ZSH'`
DEBUG Command failed: Err(
   0: Command failed: `zsh -c 'source /home/loic/.zshrc > /dev/null && export -p | grep ZSH > /dev/null && echo $ZSH'`

      Stderr:
      /home/loic/.zshrc:56: command not found: z4h
   1: `zsh` failed: exit status: 127

Location:
   /home/loic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-13.0.0/src/steps/zsh.rs:190)
DEBUG Step "oh-my-zsh" failed:
   0: Command failed: `zsh -c 'source /home/loic/.zshrc > /dev/null && export -p | grep ZSH > /dev/null && echo $ZSH'`

      Stderr:
      /home/loic/.zshrc:56: command not found: z4h
   1: `zsh` failed: exit status: 127

Location:
   /home/loic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-13.0.0/src/steps/zsh.rs:190
oh-my-zsh failed:
   0: Command failed: `zsh -c 'source /home/loic/.zshrc > /dev/null && export -p | grep ZSH > /dev/null && echo $ZSH'`

      Stderr:
      /home/loic/.zshrc:56: command not found: z4h
   1: `zsh` failed: exit status: 127

Location:
   /home/loic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-13.0.0/src/steps/zsh.rs:190
Retry? (y)es/(N)o/(s)hell/(q)uit
@romkatv
Copy link
Owner

romkatv commented Jan 19, 2024

If I understand it correctly, this code is running the following command:

zsh -c 'source /home/loic/.zshrc > /dev/null && export -p | grep ZSH > /dev/null && echo $ZSH'

This command is not supposed to work, so sometimes it does not. Try this instead:

zsh -ic 'print -r -- ${ZSH:?}'

This is the whole command that you can use as a substitute for the buggy one.

@lbonvarl
Copy link
Author

issue fixed in topgrade-rs/topgrade#647

@romkatv
Copy link
Owner

romkatv commented Feb 22, 2024

Great! Closing.

@romkatv romkatv closed this as completed Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants