Open underyx opened 1 year ago
Sorry for the late response, was stressed the last weeks.
What happens when you run this command:
/bin/zsh -i -c 'source /Users/underyx/.zshrc && zinit self-update && zinit update --all'
hey, no worries at all! I just ran it (because I need to wait until an update is actually available for something to trigger the error) and it indeed caused the same issue!
I'll mention that there's another annoying behavior when using the command you provided (and also when running topgrade). The self-update prints its changelog with an interactive pager and everything is suspended until I press q
to exit it. This doesn't happen if I remove the -i
flag from the /bin/zsh
command.
What did you expect to happen?
Running
zinit update
upgrades my zsh modules correctly, I expected the same fromtopgrade
.What actually happened?
I have these two modules in my
zshrc
that I noticed are affected:Whenever topgrade bumps the version of
gh
ordirenv
, I start getting these errors in my shell:This is because the
mv"direnv* -> direnv"
instruction is supposed to make zinit rename this file todirenv
after an update, but the rename doesn't happen (only whentopgrade
runs zinit update):Additional Details
The rename happens correctly when I run
zinit update
in my shell.The command executed for zinit is:
which seems correct. I'm suspecting that for some reason in the subshell topgrade uses, the
mv"direnv* -> direnv"
instruction somehow gets glob expanded. If this is the case, then the asterisk should be passed to zinit verbatim for correct behavior. Or it might be the exact other way; maybe zinit normally relies on the shell resolvingdirenv*
but this doesn't happen when running via topgrade.You can find my dotfiles here: https://github.com/underyx/dotfiles
And specifically the zinit modules here: https://github.com/underyx/dotfiles/blob/main/zsh/main