linutil
linutil copied to clipboard
chore: Remove unwanted case
Type of Change
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation update
- [x] Refactoring
- [ ] Hotfix
- [ ] Security patch
- [ ] UI/UX improvement
Description
- Unsupported package manager is already handled in common-script.sh https://github.com/ChrisTitusTech/linutil/blob/26d0adc829ac59893666559f1c126d05b7fddc6b/core/tabs/common-script.sh#L86
- Removed pacman from linutil-installer.sh cargo installation section as pacman case is already handled.
- Remove snaps script is excluded as it may conflict with #756
Testing
- No errors works as expected.
Checklist
- [x] My code adheres to the coding and style guidelines of the project.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no errors/warnings/merge conflicts.
What if a different package manager is added? This PR offers no improvements to maintainability or anything of the sort, and only offers the potential for issues to come up in the future.
If another package manager is added it will be handled anyway. For example, if we are adding nix then we will be adding nix to most of the scripts. If nix cannot be used for a specific script then it will be handled as unsupported. Having extra bloat that will not be reached is useless anyway.
If nix cannot be used for a specific script then it will be handled as unsupported.
Yes. And this PR proposes the removal of that error handling.
Having extra bloat that cannot be reached is useless anyway 🤷🏻♂️ We can always add them back to scripts that don't support packagers later
Having extra bloat that cannot be reached is useless anyway 🤷🏻♂️ We can always add them back to scripts that don't support packagers later
They cannot be reached assuming all package managers supported by linutil are supported by the script. I've just stated a way in which that condition could be broken. Your idea of adding this code back in the case of any changes illustrates why removing it is a poor decision to begin with.