From 25bb74308bfd184b931254a0f7079b1471299b09 Mon Sep 17 00:00:00 2001 From: Igor Anic Date: Thu, 25 Nov 2021 19:11:10 +0100 Subject: [PATCH] remove Error: ^C message on survey interrupt When I start survey and press ctrl-C I got Error: ^C. Removing that output. --- cli/cmd/root.go | 1 - cli/controller/signup.go | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/cmd/root.go b/cli/cmd/root.go index 5f924b6e..ba781225 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -231,7 +231,6 @@ Please check the following rules when naming projects, stages and functions: table.Render() return } - //ok, _ := cmd.InheritedFlags().GetBool("no-color") ui.Error(err) } diff --git a/cli/controller/signup.go b/cli/controller/signup.go index a8a6ece8..f5ccfef0 100644 --- a/cli/controller/signup.go +++ b/cli/controller/signup.go @@ -17,6 +17,9 @@ var signupEndpoint = apiEndpoint{url: "https://ytg5gfkg5k.execute-api.eu-central func Register() error { rr, err := survey() if err != nil { + if err == promptui.ErrInterrupt { + return nil + } return log.Wrap(err) } if err := signupEndpoint.Call("register", rr, nil); err != nil {