From 01a4dbfc963fcbf6f916aa2b423f94915697d025 Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Thu, 17 Jun 2021 16:37:33 +0200 Subject: [PATCH] Accept any input for the first pause --- sh/debian/ubuntu/system/usr/local/src/format/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 f50faf8a..57415a21 100644 --- a/sh/debian/ubuntu/system/usr/local/src/format/main.go +++ b/sh/debian/ubuntu/system/usr/local/src/format/main.go @@ -1,6 +1,7 @@ package main import ( + "bufio" "encoding/json" "errors" "fmt" @@ -97,7 +98,7 @@ func main() { fmt.Println(" - do not plug/unplug any drive") fmt.Println(" - make sure the drive is not in use") fmt.Print("Press ENTER to continue") - fmt.Scanln() + bufio.NewScanner(os.Stdin).Scan() // Get a list of the block devices var data struct {