You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is not the = sign itself, but the fact that with it, the ~ symbol does not get expanded to your home directory. For example if you run with --libraries=/home/something/Arduino/libraries or --libraries=$HOME/Arduino/libraries it should work just fine.
I would like to help fixing this issue but I don't really know at which level it should be fixed. Is this something to be fixed when parsing the arguments with cobra or later on in LibrariesLoader? Or is it a cobra issue? (it seems related to spf13/cobra#1577)
If someone from Arduino has some guidance I'd be happy to contribute 😃
The substitution of the ~ is a duty of the shell. So I think there is noting we can do on the CLI side. Also ~ is not available on Windows, so there is no point in doing the substitution inside the CLI.
According to bash docs the tilde only gets expanded when it is at the start of a word. So when bash sees a token like something=~something will not expand it.
Describe the problem
The following command fails to build because it can't see the libraries installed
arduino-cli compile --fqbn arduino:avr:mega --libraries=~/Arduino/libraries --output-dir ./build .
The following command builds correctly
arduino-cli compile --fqbn arduino:avr:mega --libraries ~/Arduino/libraries --output-dir ./build .
Note the only difference is the equals sign
To reproduce
Run
arduino-cli compile --fqbn arduino:avr:mega --libraries=~/Arduino/libraries --output-dir ./build .
Or similar for any sketch that includes a library in the Arduino/libraries folder. Then change the equals sign to a space for it to work
Expected behavior
I would expect it to work with the equals sign, equals sign is usually supported by commandline tools
Arduino CLI version
0.29.0
Operating system
Linux
Operating system version
Debian 11 x86_64, kernel 5.10.0-19-amd64
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: