-
-
Notifications
You must be signed in to change notification settings - Fork 403
lib install --git-url with a local path does not work as expected #1120
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
Comments
A workaround could be to supply the |
@alranel the
|
The help message for Anyway, the main issue reported here is that |
this is bread for @silvanocerza when he's back :) |
I can't reproduce this, I cloned the WiFi101 library locally and tried installing it using the absolute path and it's installed correctly in Also local paths to Git repos are valid URLs as specified by Git documentation. |
@silvanocerza I just tried again and I can reproduce the issue consistently, even if I install another library or I try to supply a relative path instead of an absolute path. This is my config:
|
That would be strange but wouldn't surprise me one bit. @ubidefeo could you give it a try? |
Now after doing something I cannot replicate it anymore, but I'm noticing something strange:
However, there's no |
Have you actually called it like that or it the The |
I added Anyway, I found the bug: arduino-cli/arduino/libraries/librariesmanager/install.go Lines 115 to 121 in 8f5d38b
This is the logic that composes the destination path where the repo is cloned to. It assumes that the last token in the path is the name of the directory, optionally followed by |
Well yes, that's a bug then. Could you open another issue about it so we can keep track of it separately from the opening one? |
It is the same issue actually! |
Yep, I can reproduce it! I'll get to it. |
Bug Report
Current behavior
It looks like a local path is accepted as argument for
--git-url
. However the library is installed incorrectly, because it looks like it is copied in the root of the libraries directory instead of under its own directory:Expected behavior
Either:
or:
Note that it works correctly if I supply a proper git URL (
https://github.com/foo/bar.git
).Environment
arduino-cli version
):arduino-cli alpha Version: 0.14.0 Commit: a86b21d99e2af9e0857da0ce4ab80baf1d3afb55 Date:
macOS
Additional context
I was looking for a way to install a library located in my filesystem. A
--path
argument could be handy in addition to--git-url
and--zip-file
. Incidentally, my local library is a clone of a git repo so I tried to use--git-url
so I discovered this bug.The text was updated successfully, but these errors were encountered: