Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 25, 2023

Previously, if there was a problem during the flashing stage of the certificate flash command invocation, Arduino Firmware Uploader would exit silently, giving the user no feedback that something had gone wrong other than a generic exit status 1:

$ touch /tmp/cert-with-unsupported-extension.crt

$ arduino-fwuploader certificates flash --address COM42 --file /tmp/cert-with-unsupported-extension.crt --fqbn arduino:renesas_uno:unor4wifi

Converting and flashing certificate C:/Users/per/AppData/Local/Temp/cert-with-unsupported-extension.crt

$ echo $?

1

After the change proposed here, Arduino Firmware Updater clearly communicates to the user that the command failed, and why:

$ arduino-fwuploader certificates flash --address COM42 --file /tmp/cert-with-unsupported-extension.crt --fqbn arduino:renesas_uno:unor4wifi

Converting and flashing certificate C:/Users/per/AppData/Local/Temp/cert-with-unsupported-extension.crt
Error during certificates flashing: cert format .crt not supported, please use .pem or .cer

Previously, if there was a problem during the flashing stage of the certificate flash command invocation, Arduino
Firmware Uploader would exit silently, giving the user no feedback that something had gone wrong other than a generic
exit status 1:

```
$ touch /tmp/cert-with-unsupported-extension.crt

$ arduino-fwuploader certificates flash --address COM42 --file /tmp/cert-with-unsupported-extension.crt --fqbn arduino:renesas_uno:unor4wifi

Converting and flashing certificate C:/Users/per/AppData/Local/Temp/cert-with-unsupported-extension.crt

$ echo $?

1
```
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Aug 25, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2023

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 12.10%. Comparing base (45b115d) to head (9c1e4eb).
⚠️ Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
cli/certificates/flash.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   12.10%   12.10%           
=======================================
  Files          20       20           
  Lines        1165     1165           
=======================================
  Hits          141      141           
  Misses        971      971           
  Partials       53       53           
Flag Coverage Δ
unit 12.10% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@per1234 per1234 merged commit f07445f into arduino:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants