z-shell / z-a-meta-plugins

🌀 An annex delivers the capability to install a group of plugins via a single, friendly label
https://wiki.zshell.dev/ecosystem/annexes/meta-plugins
GNU General Public License v3.0
13 stars 8 forks source link

[bug]: atpull'zi creinstall -q .' in zsh-users/zsh-completions break symlink #13

Closed Kritiqual closed 1 year ago

Kritiqual commented 1 year ago

Environment

OSTYPE=linux-gnu CPUTYPE=x86_64 / MACHINE_TYPE=x86_64 ZSH_VERSION=5.9

Expected behavior

When install the first time, completions file will be installed like this:

$ ls ~/.local/zi/completions

_afew -> ~/.local/zi/plugins/zsh-users---zsh-completions/src/_afew
_android -> ~/.local/zi/plugins/zsh-users---zsh-completions/src/_android
_archlinux-java -> ~.local/zi/plugins/zsh-users---zsh-completions/src/_archlinux-java
...

And I expect this still remain after zi update --all

Current behavior

For comparison:

_afew -> ~/.local/zi/plugins/zsh-users---zsh-completions/src/_afew _android -> ~/.local/zi/plugins/zsh-users---zsh-completions/src/_android _archlinux-java -> ~/.local/zi/plugins/zsh-users---zsh-completions/src/_archlinux-java

- Broken [2]

$ ls ~/.local/zi/completions

_afew -> ./src/_afew _android -> ./src/_android _archlinux-java -> ./src/_archlinux-java

Zsh will complain about those broken symlink after next reload

### Steps to reproduce

- Step 1: Install with
```zsh
zi wait lucid light-mode for blockf atpull'zi creinstall -q .' zsh-users/zsh-completions

Code snippet

I just pust above install command to .zshrc

Aditional information

None

Self-service

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

ss-o commented 1 year ago

Hi @Kritiqual :wave:

I was able to reproduce the issue on the system where zsh-users/zsh-completions was available on the disk (installed), then re-tried to produce the case with a clean install (rm -rf ~/.zi; exec zsh -il), but this time unsuccessfully, and after trying multiple times/methods wasn't able to reproduce the issue.

Kritiqual commented 1 year ago
ss-o commented 1 year ago

Great that the solution was so simple :tada: :dart: However a bit confused about how I was able to reproduce your issue once :hear_no_evil: Thank you for the confirmation! :handshake:

Kritiqual commented 1 year ago

Yeah, the issue only happen when the plugin is previously installed. Perhaps you can consider making that change into the source, but maybe some more test is needed, idk

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.