Skip to content

Commit 3089dd4

Browse files
committed
Reversing the order of the flashCerts() and flashFirmware() functions
allows to use both commands in the same command line preventing certificates from being deleted when the firmware is flashed
1 parent 3c393c4 commit 3089dd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/github.com/arduino-libraries/WiFi101-FirmwareUpdater/cli/main/winc1500-uploader.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ func main() {
9191
log.Fatalf("Programmer reports %d as maximum payload size (1024 is needed)", payloadSize)
9292
}
9393

94-
if rootCertDir != "" || len(addresses) != 0 {
95-
if err := flashCerts(); err != nil {
94+
if firmwareFile != "" {
95+
if err := flashFirmware(); err != nil {
9696
log.Fatal(err)
9797
}
9898
}
9999

100-
if firmwareFile != "" {
101-
if err := flashFirmware(); err != nil {
100+
if rootCertDir != "" || len(addresses) != 0 {
101+
if err := flashCerts(); err != nil {
102102
log.Fatal(err)
103103
}
104104
}

0 commit comments

Comments
 (0)