Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

[FEATURE-REQUEST] Call package manager from PATH instead of hard-coding paths #248

Open
antecrescent opened this issue Jan 4, 2024 · 1 comment

Comments

@antecrescent
Copy link

Is your feature request related to a problem? Please describe.
Currently, uwufetch relies on the undocumented PKGPATH macro to define the path to where the package manager lies.
If not set, it defaults to /usr/local/bin and /usr/bin for macOS and other operating systems respectively.
This logic breaks non-standard/exotic setups such as running uwufetch in prefixed Gentoo Linux, where the resulting absolute path to qlist would be ${EPREFIX}/usr/bin/qlist with EPREFIX being an arbitrary user-accessible directory.

Describe the solution you'd like
I suggest calling the package managers from PATH. The implementation should be straight forward and it has the bonus of being flexible with respect to moving binaries.

Describe alternatives you've considered
Account for exotic setups by documenting and defining PKGPATH at compile time and adapt the libfetch logic accordingly. This needs uwufetch to recompile upon migration of the package manager's install location.

@ad-oliviero
Copy link
Owner

I'll work on that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants