Skip to content

Commit 79caebc

Browse files
committed
Improve mass-upload feedback
1 parent cff6c06 commit 79caebc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: cli/ota/massupload.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package ota
1919

2020
import (
21+
"fmt"
2122
"os"
2223
"sort"
2324
"strings"
@@ -95,10 +96,11 @@ func runMassUploadCommand(cmd *cobra.Command, args []string) {
9596
if len(failed) == 0 {
9697
return
9798
}
98-
failStr := strings.Join(failed, ",")
99+
failDevs := strings.Join(failed, ",")
99100
feedback.Printf(
100101
"You can try to perform the OTA again on the failed devices using the following command:\n"+
101-
"$ arduino-cloud-cli ota upload --file %s -d %s", params.File, failStr,
102+
"$ arduino-cloud-cli ota mass-upload --file %s --fqbn %s -d %s",
103+
params.File, params.FQBN, failDevs,
102104
)
103105
}
104106

@@ -119,7 +121,7 @@ func (r massUploadResult) String() string {
119121
for _, r := range r.res {
120122
outcome := "Success"
121123
if r.Err != nil {
122-
outcome = r.Err.Error()
124+
outcome = fmt.Sprintf("Fail: %s", r.Err.Error())
123125
}
124126

125127
t.AddRow(

0 commit comments

Comments
 (0)