Skip to content
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

[mesheryctl] system reset should ask confirmation from the user #2283

Closed
pottekkat opened this issue Jan 21, 2021 · 4 comments · Fixed by #2287
Closed

[mesheryctl] system reset should ask confirmation from the user #2283

pottekkat opened this issue Jan 21, 2021 · 4 comments · Fixed by #2287
Assignees
Labels
component/mesheryctl CLI for Meshery kind/enhancement Improvement in current feature

Comments

@pottekkat
Copy link
Contributor

pottekkat commented Jan 21, 2021

Current Behavior

Running mesheryctl system reset will reset meshery to its default setting. As of PR #2265 (soon to be merged)

user@computer:$ mesheryctl system reset
Meshery resetting...

Current Context: local
Channel: stable
Version: v0.4.20

Fetching default docker-compose file at version: v0.4.20...

...Meshery config (/home/user/.meshery/meshery.yaml) now reset to default settings.

Desired Behavior

system reset should ask the user whether they are sure about resetting to default.

Implementation

Instead of initiating reset, the system reset command could ask the user something like this(open for discussion) as shown and then continue the reset process.

user@computer:$ mesheryctl system reset
Meshery config file will be reset to system defaults. Are you sure you want to continue [y/n]? y

Meshery resetting...

Current Context: local
Channel: stable
Version: v0.4.20

Fetching default docker-compose file at version: v0.4.20...

...Meshery config (/home/user/.meshery/meshery.yaml) now reset to default settings.
@leecalcote
Copy link
Member

Looking good. Slight tweak of language and placement of the question mark:

Meshery config file will be reset to system defaults. Are you sure you want to continue [y/n]? y

@pottekkat
Copy link
Contributor Author

Okay, that is so much better.

@leecalcote
Copy link
Member

Responding with “invalid response” is acceptable if the user doesn’t respond with a yes or a no. A small improvement here would be to continue to ask them the question until they respond with yes or no.

@pottekkat
Copy link
Contributor Author

@leecalcote I have changed it to do exactly that in the last commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/mesheryctl CLI for Meshery kind/enhancement Improvement in current feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants