1
0
mirror of https://github.com/byReqz/go-etcher.git synced 2024-11-25 16:14:55 +00:00

make force flag actually do something

This commit is contained in:
Nils 2022-02-07 12:44:07 +01:00
parent e9ac06c8cf
commit 30afa9ae21
Signed by: byreqz
GPG Key ID: 396A62D7D436749E

View File

@ -239,6 +239,7 @@ func main() {
} }
fmt.Println("[", color.BlueString("i"), "] Input device/file: " + input, inputmb, inputblock) fmt.Println("[", color.BlueString("i"), "] Input device/file: " + input, inputmb, inputblock)
fmt.Println("[", color.BlueString("i"), "] Output device/file: " + device, devicemb, targetblock) fmt.Println("[", color.BlueString("i"), "] Output device/file: " + device, devicemb, targetblock)
if force == false {
if inputsize > targetsize { if inputsize > targetsize {
fmt.Println("[", color.RedString("w"), "]", color.RedString(" Warning:"), "Input file seems to be bigger than the destination!") fmt.Println("[", color.RedString("w"), "]", color.RedString(" Warning:"), "Input file seems to be bigger than the destination!")
} }
@ -249,7 +250,7 @@ func main() {
if ! (yesno == "y" || yesno == "Y") { if ! (yesno == "y" || yesno == "Y") {
log.Fatal("aborted") log.Fatal("aborted")
} }
}
written, err := WriteImage(image, target, inputsize) written, err := WriteImage(image, target, inputsize)
if err != nil { if err != nil {
fmt.Println("\r[", color.RedString("✘"), "] Writing image,", written, "bytes written ") fmt.Println("\r[", color.RedString("✘"), "] Writing image,", written, "bytes written ")