Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install plugins to plugin location if specified #8

Open
maximilien opened this issue Apr 15, 2021 · 4 comments
Open

Install plugins to plugin location if specified #8

maximilien opened this issue Apr 15, 2021 · 4 comments
Assignees
Labels
kind/enhancement kind/good-first-issue Denotes an issue ready for a new contributor. kind/proposal Issues or PRs related to proposals.

Comments

@maximilien
Copy link
Contributor

Knative plugins can be installed either in the user’s PATH or if specified in the user’s ~/.config/kn/config.yaml in the `~/.config/kn/plugins directory.

Currently the plugin formulas only install the plugin’s binary in the user’s PATH.

The formulas should check the user’s config and decide where to install the plugin according to the user’s choice.

Default location should be in PATH

@maximilien maximilien self-assigned this Apr 15, 2021
@maximilien
Copy link
Contributor Author

maximilien commented Apr 15, 2021

@navidshaikh @rhuss please comment if you disagree or have questions or want to chime in.

I will try to get to this tomorrow PM and early next week. Certainly to have this before next release

FYI: @zhanggbj @cdlliuy @zhangtbj since you all have plugins.

@maximilien maximilien added kind/enhancement kind/proposal Issues or PRs related to proposals. labels Apr 15, 2021
@navidshaikh
Copy link
Contributor

I wonder if we should limit the brew installed plugins only under PATH. This way we've consistent destination for kn binaries installed via brew. User installed plugins can land in plugin's directory and we'll have clear distinction for source of plugin.

@maximilien
Copy link
Contributor Author

I am OK with that. WDYT @rhuss?

I’ll add an issue so message the user where the plugins are installed. Independently if we decide to do PATH and / or config since that should tell user something they need to know.

@rhuss
Copy link
Contributor

rhuss commented Apr 19, 2021

The only issue that I see with this approach is that we do not a default lookup in PATH, only when enabled in the configuration. So this would lead to the unexpected behaviour that you install a plugin with homebrew but it wouldn't be picked up by kn.

A solution would be to add an output while installing (but honestly, this is often overlooked) or we could check ~/.config/kn/config.yaml for that configuration and print out a big fat WARNING if 'lookupInPath' is not set.

The third option would be to change the default lookup behaviour but changing defaults is not possible in a backwards compatible way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement kind/good-first-issue Denotes an issue ready for a new contributor. kind/proposal Issues or PRs related to proposals.
Projects
None yet
Development

No branches or pull requests

3 participants