From a6e4c85d31bb5080c0783299e3636dc3948d6963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Let?= Date: Sat, 13 May 2023 22:47:59 +0200 Subject: [PATCH] Installation fixes --- cmd/control/cmd/update.go | 1 + internal/device/device.go | 2 +- scripts/install.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/control/cmd/update.go b/cmd/control/cmd/update.go index c74c555..1d35dd8 100644 --- a/cmd/control/cmd/update.go +++ b/cmd/control/cmd/update.go @@ -23,6 +23,7 @@ var updateCmd = &cobra.Command{ execArgs = append(execArgs, "--beta") } execCmd := exec.Command("bash", execArgs...) + execCmd.Stdin = os.Stdin execCmd.Stdout = os.Stdout execCmd.Stderr = os.Stderr err = execCmd.Run() diff --git a/internal/device/device.go b/internal/device/device.go index 7c04f6f..d5bb13b 100644 --- a/internal/device/device.go +++ b/internal/device/device.go @@ -130,7 +130,7 @@ func promptForName(out *output.Output, fpath string) (string, error) { fmt.Printf("\nChoose a short name for this device (default: '%s'): ", hostStub) input, err := reader.ReadString('\n') name := strings.TrimRight(input, "\n") - if err != nil { + if err != nil && err.Error() != "EOF" { return "", fmt.Errorf("reader error: %w", err) } if name == "" { diff --git a/scripts/install.sh b/scripts/install.sh index 83569b8..d3a7bc5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -88,7 +88,7 @@ if [ -z "${__RESH_VERSION-}" ]; then # But don't output anything ./scripts/resh-daemon-stop.sh -q ||: else - ./scripts/resh-daemon-stop.sh + ./scripts/resh-daemon-stop.sh ||: fi echo "Installing ..."