-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actually default-yes for installing dashboard #2849
Conversation
20c2f1d
to
b23a3bd
Compare
In the description of create dashboard for gitops run issue the description was "If the user answers yes, let them enter a password and use that for the installation". So, I supposed yes was not a default value and the user had to agree to installing the dashboard (to "answer yes") explicitly? Or where did we list yes as the default value? |
Or was it somewhere in the prompts? |
The code says |
Ah, I see. Good catch will test it later. |
Tested and confirmed the issue. isConfirm sets input to "" in the promptui code:
|
b23a3bd
to
81612c6
Compare
The instructions and the implementation didn't line up - we claimed yes was default, but just hitting enter caused the value to be "" which meant we didn't actually install it. This is caused by using `IsConfirm`, where it doesn't set the default as the default value, but rather uses the error value as `nil` if the user agreed, and promptui.ErrAbort (which is `errors.New("")`) if the user didn't.
81612c6
to
13fed59
Compare
The instructions and the implementation didn't line up - we claimed yes was default, but just hitting enter caused the value to be "" which meant we didn't actually install it.
This is caused by using
IsConfirm
, where it doesn't set the default as the default value, but rather uses the error value asnil
if the user agreed, and promptui.ErrAbort (which iserrors.New("")
) if the user didn't.