Meshery: [mesheryctl] `system reset` should ask confirmation from the user

Created on 21 Jan 2021  ·  4Comments  ·  Source: layer5io/meshery

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.
componenmesheryctl kinenhancement

Most helpful comment

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

All 4 comments

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

Okay, that is so much better.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leecalcote picture leecalcote  ·  3Comments

leecalcote picture leecalcote  ·  3Comments

leecalcote picture leecalcote  ·  3Comments

hexxdump picture hexxdump  ·  4Comments

sakomws picture sakomws  ·  4Comments