little-angry-clouds / kubernetes-binaries-managers

Kubernetes related binaries manager.
GNU General Public License v3.0
101 stars 11 forks source link

Default to search PATH #31

Open cornfeedhobo opened 2 years ago

cornfeedhobo commented 2 years ago

These tools assume that they manage the version entirely, but it would be nice to have a system default, if helm exists in $PATH.

alexppg commented 2 years ago

Thanks for opening the issue! Not sure if I'll implement it, but contributions are wellcome/

alexppg commented 2 years ago

I've been thinking about it, and I don't think it would be possible. They assume they manage the version because the helm-wrapper (I'll use helm as an example, but is the same for all) is really called just helm. It's not possible for a binary called X to search for another binary called X using the PATH variable, since it will only find itself. The only thing that comes to my mind is knowing beforehand where the default binary would be, but it's not possible as there's too many places. Anyway, I'll leave this open to see if somebody has an idea.