Skip to content

Conversation

@lengyijun
Copy link

@lengyijun lengyijun commented Apr 17, 2025

Follow #798

Partial fix #770 #790

@lengyijun
Copy link
Author

lengyijun commented Apr 17, 2025

in #798, fisher update removes fish_plugins, if fish_variables is broken.

With this pr, fisher update will not remove fish_plugins.
To fix the broken fish_variables, we can

fisher_path=(mktemp -d) fisher update
fisher update

@jimblue
Copy link

jimblue commented Nov 8, 2025

Just tested, the fix is working great !

@jorgebucaran
Copy link
Owner

The original code is saying that if _fisher_plugins is empty then it removes fish_plugins entirely to avoid leaving an empty plugins file behind.

Your proposal makes sense too, but I don't understand why we need it or how it relates to #796.

Can you clarify?

@lengyijun
Copy link
Author

lengyijun commented Dec 27, 2025

The original code is saying that if _fisher_plugins is empty then it removes fish_plugins entirely to avoid leaving an empty plugins file behind.

_fisher_plugins is empty doesn't mean fish_plugins file is empty.
_fisher_plugins is broken because of some accidents, for example, reset themes.
rm fish_plugins means we forget all plugins we used to install

@lengyijun
Copy link
Author

796 should be a typo

@jorgebucaran
Copy link
Owner

@lengyijun
Do you mean there are cases where _fisher_plugins exists but fish_plugins does not, and that this only happens when _fisher_plugins is corrupted? If so, how does it get corrupted? If I can reproduce it, maybe we can prevent it.

@lengyijun
Copy link
Author

lengyijun commented Dec 30, 2025

how does it get corrupted

Not related to fisher.
fish_variables are removed to reset themes or reset environment variables

Most plugins don't rely on fish_variables.
I often remove fish_variables to reset everything

@lengyijun
Copy link
Author

Another case where _fisher_plugins is broken but fish_plugins is not:

#790 (comment)

With this pr, fish_plugins is kept, that is important

@jorgebucaran
Copy link
Owner

Why are you messing with fish_variables again?

@lengyijun
Copy link
Author

This isn't just my problem; many people have encountered this.

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

Successfully merging this pull request may close these issues.

Feature request: option to force overwrite existing files

3 participants