near-cli icon indicating copy to clipboard operation
near-cli copied to clipboard

`near delete` with positional arguments is dangerous

Open evgenykuzyakov opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Current API supports the following:

 near delete <accountId> <beneficiaryId>

It's really easy to mess up the arguments and delete the beneficiaryId account instead of accountId.

Describe the solution you'd like

There are 2 possible solutions:

  • Confirm each request. This should be on by default and overridden with -y. This way the shell will first display the action you want to do and then ask you to confirm it. Will prevent accidental mistakes.
  • Make account ID and beneficiary ID named required arguments instead of positional.

evgenykuzyakov avatar Aug 26 '20 18:08 evgenykuzyakov