Check command line prompt error

This commit is contained in:
harryzcy 2023-02-21 14:48:06 -05:00
parent f7587619f8
commit 26a5c6bc49
No known key found for this signature in database
GPG Key ID: E3C2287691E40E35

View File

@ -119,7 +119,10 @@ func getPullIndex(ctx *context.TeaContext, branch string) (int64, error) {
Options: prOptions, Options: prOptions,
PageSize: 10, PageSize: 10,
} }
survey.AskOne(q, &selected) err = survey.AskOne(q, &selected)
if err != nil {
return 0, err
}
// get the index from the selected option // get the index from the selected option
before, _, _ := strings.Cut(selected, ":") before, _, _ := strings.Cut(selected, ":")