From dfe8ce6a458a9d5aa316e784f2772d34648a117e Mon Sep 17 00:00:00 2001 From: Dieter Eickstaedt Date: Mon, 21 Nov 2022 15:39:30 +0100 Subject: [PATCH] bugfix: Only display Cancel if explicitly asked for --- confirm/command.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confirm/command.go b/confirm/command.go index 60f9fea..e213a07 100644 --- a/confirm/command.go +++ b/confirm/command.go @@ -24,7 +24,11 @@ func (o Options) Run() error { // set options options = append(options, o.Affirmative) options = append(options, o.Negative) - options = append(options, o.Canceled) + if o.WithCancel { + options = append(options, o.Canceled) + } else { + options = append(options, "") + } // what is default theDefault = o.Default