From 26a5c6bc49967b76cf04affe424202437ebd2885 Mon Sep 17 00:00:00 2001 From: harryzcy Date: Tue, 21 Feb 2023 14:48:06 -0500 Subject: [PATCH] Check command line prompt error --- cmd/pulls/merge.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/pulls/merge.go b/cmd/pulls/merge.go index 775dae5..3a1e27b 100644 --- a/cmd/pulls/merge.go +++ b/cmd/pulls/merge.go @@ -119,7 +119,10 @@ func getPullIndex(ctx *context.TeaContext, branch string) (int64, error) { Options: prOptions, PageSize: 10, } - survey.AskOne(q, &selected) + err = survey.AskOne(q, &selected) + if err != nil { + return 0, err + } // get the index from the selected option before, _, _ := strings.Cut(selected, ":")