Lib_deps git link not working for some users

My project on GitHub works perfectly for me on macOS and Windows, but some users are saying that the library dependency isn’t downloading. I made a YouTube video with the exact steps I followed to do a clean install of VSCode and PlatformIO, but a user (on Windows) says it still doesn’t work and the library doesn’t download. I suggested running “pio pkg list” to see what it says.

Am I doing something wrong with my platformio.ini file or the instructions in my video? I’ve been meaning to put my core library on the PIO registry, but I’ve been lazy and the GitHub link has been working fine for me. Is it necessary to install the git tool separately?

platform = atmelavr
framework = arduino
lib_deps =
monitor_filters = direct

board = nanoatmega328

board = nanoatmega328new

board = uno

The person having the problem said they get this when they type pio pkg list. Maybe something is going wrong when they install the PlatformIO IDE extension??

pio : The term 'pio' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pio pkg list
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pio:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

That’s correct - Git needs to be installed.

You need to open a PlatformIO Terminal.

There are several ways to do this:

  • PlatformIO-Button on the left sidebar / Miscellaneous / New Terminal
  • The “boxed chevron button” next to the serial monitor button in the status-bar:
  • CTRL-SHIFT-P: Then enter “PlatformIO: Terminal

Alternatively, in Windows you can add the path to pio.exe (C:\Users\<username>\.platformio\penv\Scripts) to the path variable.
This way you can use the pio command in a standard terminal.

If I put my library on the PlatformIO registry and use that instead, will the project work without installing git?

As far as I know, this should work without installing git.

Ok, thanks! I’ll try and repro this on a system without git installed and post the results back here.

Alternatively replace it with the .zip download link

However, referecning master branches of repos is not good practice – if you change something in your repo, old projects might break. You might want to reference a fixed commit, tag or release.

Thanks, I’ll give that a try as well. I know I really need to do a 0.1 release of my library and tag it. This is a good excuse to finally do so :smiley:

Using the zip link works great, thanks!

I was surprised to see that the git link just fails silently without git installed! I expected to see an error message or something indicating a required library failed to download. I think I’ll stick with pio registry or zip from now on.