diff --git a/sh/debian/ubuntu/system/usr/local/src/format/main.go b/sh/debian/ubuntu/system/usr/local/src/format/main.go index 3e195e64..90ccae29 100644 --- a/sh/debian/ubuntu/system/usr/local/src/format/main.go +++ b/sh/debian/ubuntu/system/usr/local/src/format/main.go @@ -170,13 +170,10 @@ func main() { return } var nb int - if len(devices) > 1 { + if choice != "" { nb, err := strconv.Atoi(choice) - if err != nil { - fatalln("Wrong disk number", choice) - } - if nb < 0 || nb >= len(devices) { - fatalln("Wrong disk number, choose between", 0, "and", len(devices)-1) + if err != nil || nb < 0 || nb >= len(devices) { + fatalln("Wrong disk number:", choice) } } device := devices[nb]