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

feat: Support for changing the location of plugin scripts #1185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yacchi
Copy link
Contributor

@yacchi yacchi commented Mar 17, 2022

Summary

I would like to be able to install the tools I am creating with asdf.

I also want to provide the tool itself and the asdf plugin in the same git repository to simplify source code management.
However, since bin and lib are also used for other purposes, I would like to put the asdf plugin in a separate directory to avoid confusion.

I have tried to implement this by placing a configuration file .asdf-plugin in the root of the repository and writing the path to the asdf plugin in it.

Of course, if the .asdf-plugin file does not exist, the behavior will be the same as before.

For example, to place the script in contrib/asdf, I would configure it as follows:

.asdf-plugin

plugin_directory = contrib/asdf
$ ls contrib/asdf/bin
list-all
install
download

@yacchi yacchi requested a review from a team as a code owner March 17, 2022 20:00
@yacchi
Copy link
Contributor Author

yacchi commented May 20, 2022

Since I will be introducing a new configuration file, please allow me to correct or explain any parts that are not good or difficult to understand.

@jthegedus
Copy link
Contributor

I'm not opposed to changing the plugins dir location, but why not make this a configuration option of the existing .asdfrc config file?

@yacchi
Copy link
Contributor Author

yacchi commented May 25, 2022

@jthegedus
Thanks for the review!

Am I correct in assuming that the .asdfrc setting can enable the ability to read .asdf-plugin files?
Right now there are only plugins that do not require this functionality, so it would be better to have a setting as suggested.

I will try to add the following settings:

.asdfrc:

load_asdf_plugin_configuration = true

@yacchi
Copy link
Contributor Author

yacchi commented Jun 5, 2022

@jthegedus
I have changed this feature to be enabled by adding use_asdf_plugin_configuration = yes to .asdfrc.
(I changed it from load_asdf_plugin_configuration because there was already a configuration item starting with use_)

I also followed to upstream.

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

Successfully merging this pull request may close these issues.

2 participants