Skip to content

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy