Skip to content

Commit

Permalink
print progress on stdout only if --format text is used (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
umbynos committed Aug 5, 2021
1 parent 15efd7f commit 5e2e783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/firmware/flash.go
Expand Up @@ -228,14 +228,14 @@ func updateFirmware(board *firmwareindex.IndexBoard, loaderSketch, moduleName st
return err
}
defer f.Close()
f.SetProgressCallback(printProgress)

// now flash the actual firmware
flasherOut := new(bytes.Buffer)
flasherErr := new(bytes.Buffer)
if feedback.GetFormat() == feedback.JSON {
err = f.FlashFirmware(firmwareFile, flasherOut)
} else {
f.SetProgressCallback(printProgress)
err = f.FlashFirmware(firmwareFile, os.Stdout)
}
if err != nil {
Expand Down

0 comments on commit 5e2e783

Please sign in to comment.