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

[question] Confusion on ASDF_INSTALL_PATH and ASDF_DOWNLOAD_PATH #68

Open
andreaTP opened this issue Apr 19, 2023 · 4 comments
Open

[question] Confusion on ASDF_INSTALL_PATH and ASDF_DOWNLOAD_PATH #68

andreaTP opened this issue Apr 19, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@andreaTP
Copy link

Describe the bug

First of all thanks a lot for the great tool, I'm happily using it since years now 🙂

Using this template as a base I'm trying to develop a plugin for Kiota.
The current version is here: https://github.com/andreaTP/asdf-kiota

To get things working I have had to craft the script to sanitize the paths passed by the env variables, done here.
Unfortunately, this doesn't (probably) play nicely with the GH actions that are still failing.

Without the mangling, the variables are looking pretty strange, e.g.:

ASDF_DOWNLOAD_PATH=/Users/<user>/.asdf/downloads/kiota/https://github.com/microsoft/kiota/releases/tag/v1.1.3

Here I'm asking for guidance on how to proceed to fix the CI and possibly follow best practices in the plugin development.
Thanks in advance!

@andreaTP andreaTP added the bug Something isn't working label Apr 19, 2023
@jthegedus
Copy link
Collaborator

Related to asdf-vm/asdf#1028

@jthegedus
Copy link
Collaborator

jthegedus commented Apr 20, 2023

The result you're after is:

-ASDF_DOWNLOAD_PATH=/Users/<user>/.asdf/downloads/kiota/https://github.com/microsoft/kiota/releases/tag/v1.1.3
+ASDF_DOWNLOAD_PATH=/Users/<user>/.asdf/downloads/kiota/1.1.3

So you will need to update your code so the version is pulled out of the URL.

This may be related to #65 So have a look at that code change and see if it fixes your issue

@andreaTP
Copy link
Author

Thanks for the answer @jthegedus !
I think I'm facing this very same issue: asdf-vm/actions#548

I'm on Mac and it looks like the version can come in 2 formats depending on the platform, handling the 2 cases solves the issue for me:
https://github.com/andreaTP/asdf-kiota/blob/45f6c1e3cf00b375414fae4f0169a3fc7f48d302/lib/utils.bash#L37-L59

@jthegedus
Copy link
Collaborator

The OP of asdf-vm/actions#548 reported their issue was fixed by a change to the sed in latest-stable. I recommend you try that fix in your plugin asdf-vm/actions#548 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants