Bash-it / bash-it

A community Bash framework.
MIT License
14.14k stars 2.29k forks source link

[Bug]: Uninstall script shouldn't delete existing bashrc and mindlessly pull from old backup #2238

Open hrfried opened 7 months ago

hrfried commented 7 months ago

Expected behavior

Should NOT just revert back to a config created at initial install that may be ages out of date...

Current behavior

It apparently creates a backup at the first install then just reverts back to that, deleting any changes that may have been made since.

Possible solution

Just don't do that....create a backup just in case of the existing file...pull into a separate .bashitrc file...

Easiest half-ass fix would be to drop in a line to copy the file to be overwritten over to .bashrc-bashit-uninstall and prompt the user to delete it afterwards if they want. Not just pull from an indeterminately old backup and wipe over it.

Context

Tested out bash-it ages ago and it didn't fit my needs. Was cleaning up stuff and saw it had an uninstall script. Should have looked before running...thankfully I have backups, but that's not an acceptable way to do this.

Steps to reproduce

Trivial

Bash-it version

dontcarebutcurrent

List of enabled plugins, themes and aliases

irrelevant

Bash version

irrelevant

Operating system and version

irrelevant

bash-it doctor output

# How to get: bash-it doctor

Your ~/.bashrc

irrelevant

Notes

No response