Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/arduino-flasher-cli/flash/flash.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"github.com/arduino/go-paths-helper"
runas "github.com/arduino/go-windows-runas"
"github.com/fatih/color"
"github.com/spf13/cobra"

"github.com/arduino/arduino-flasher-cli/cmd/feedback"
Expand Down Expand Up @@ -98,7 +99,7 @@ func runFlashCommand(ctx context.Context, args []string, forceYes bool, preserve
}

if !forceYes && !preserveUser {
feedback.Print("\nWARNING: flashing a new Linux image on the board will erase any existing data you have on it.")
feedback.Print(color.RedString("\nWARNING: flashing a new Linux image will erase any existing data that you have on the board.\n"))
feedback.Printf("Do you want to proceed and flash %s on the board? (yes/no)", args[0])

var yesInput string
Expand Down
5 changes: 3 additions & 2 deletions internal/updater/flasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"strings"

"github.com/arduino/go-paths-helper"
"github.com/fatih/color"
"github.com/shirou/gopsutil/v4/disk"

"github.com/arduino/arduino-flasher-cli/cmd/feedback"
Expand Down Expand Up @@ -140,8 +141,8 @@ func FlashBoard(ctx context.Context, downloadedImagePath string, version string,
if errT != nil {
warnStr = errT.Error()
}
feedback.Printf("\nWARNING: %s.", warnStr)
feedback.Printf("Do you want to proceed and flash %s on the board, erasing any existing data you have on it? (yes/no)", target)
feedback.Print(color.RedString("\nWARNING: %s. It will not be possible to preserve your data.\n", warnStr))
feedback.Printf("Do you want to proceed and flash %s on the board? (yes/no)", target)

var yesInput string
_, err := fmt.Scanf("%s\n", &yesInput)
Expand Down