fix: respect NoInput and avoid crashing on init

This commit is contained in:
decentral1se 2021-12-21 02:27:25 +01:00
parent ddbf923338
commit 6100a636a6
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 3 additions and 3 deletions

View File

@ -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)