From 6100a636a6a3c882b61bce452278e60927fea610 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Tue, 21 Dec 2021 02:27:25 +0100 Subject: [PATCH] fix: respect NoInput and avoid crashing on init --- cli/recipe/release.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/recipe/release.go b/cli/recipe/release.go index bb94dbb8..9e3dc46a 100644 --- a/cli/recipe/release.go +++ b/cli/recipe/release.go @@ -111,10 +111,10 @@ You may invoke this command in "wizard" mode and be prompted for input: logrus.Fatal(err) } - if internal.TagMessage == "" { + if internal.TagMessage == "" && !internal.NoInput { prompt := &survey.Input{ Message: "tag message", - Default: fmt.Sprintf("chore: publish new %s version", internal.GetBumpType()), + Default: "chore: publish new release", } if err := survey.AskOne(prompt, &internal.TagMessage); err != nil { @@ -149,7 +149,7 @@ You may invoke this command in "wizard" mode and be prompted for input: if internal.CommitMessage == "" && !internal.NoInput { prompt := &survey.Input{ Message: "commit message", - Default: fmt.Sprintf("chore: publish new %s version", internal.GetBumpType()), + Default: "chore: publish new %s version", } if err := survey.AskOne(prompt, &internal.CommitMessage); err != nil { logrus.Fatal(err)