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

arduino-cli lib install has exit status 0 when library is not found #712

Closed
per1234 opened this issue May 18, 2020 · 0 comments · Fixed by #728
Closed

arduino-cli lib install has exit status 0 when library is not found #712

per1234 opened this issue May 18, 2020 · 0 comments · Fixed by #728

Comments

@per1234
Copy link
Contributor

per1234 commented May 18, 2020

Bug Report

Current behavior

$ arduino-cli lib install foo
Error resolving dependencies for foo: looking for library: library foo not found

$ echo $?
0

Expected behavior

I would expect the command to have exit status 1 when the library is not found.

This would make the command's behavior consistent with arduino-cli core install:

$ ./arduino-cli core install foo:bar
Error during install: finding platform dependencies: package foo not found

$ echo $?
1

It would also be consistent with the behavior of the Arduino IDE's CLI:

$ ./arduino --install-library foo 2>/dev/null
Downloading libraries index... 
Downloading libraries index... 
Updating list of installed libraries
Selected library is not available
$ echo $?
1

Environment

  • CLI version (output of arduino-cli version): Version: 0.10.0-rc1 Commit: ebc28e1
  • OS and platform: Ubuntu 64 bit, Windows 64 bit

Additional context

Exit status 1 on failed library installation would be helpful for the use of Arduino CLI in automation applications. With the current behavior, the failure of the library installation is only manifested by compilation failure due to the missing header file. That makes troubleshooting the issue more difficult than if the process had failed at the library installation stage of the process.

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 a pull request may close this issue.

1 participant