Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f07445f

Browse files
authored
Print error message on certificate flash failure (#215)
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 # Create dummy certificate file. Valid certificate is not required for this demo. $ 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 ```
1 parent 45b115d commit f07445f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎cli/certificates/flash.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func runFlash(certificateURLs, certificatePaths []string) {
8585
res, flashErr := flashCertificates(uploader, certificateURLs, certificatePaths)
8686
feedback.PrintResult(res)
8787
if flashErr != nil {
88-
os.Exit(int(feedback.ErrGeneric))
88+
feedback.Fatal(fmt.Sprintf("Error during certificates flashing: %s", flashErr), feedback.ErrGeneric)
8989
}
9090
}
9191

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /