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

Ability to update email using the CLI #2175

Open
1 task done
TobyGiacometti opened this issue May 6, 2024 · 0 comments
Open
1 task done

Ability to update email using the CLI #2175

TobyGiacometti opened this issue May 6, 2024 · 0 comments
Labels

Comments

@TobyGiacometti
Copy link

TobyGiacometti commented May 6, 2024

Welcome

  • Yes, I've searched similar issues on GitHub and didn't find any.

How do you use lego?

Binary

Detailed Description

It would be great if the email update functionality (#1002) could be exposed through the CLI. The interface could look as follows:

NAME:
   lego account - Update account information.

USAGE:
   lego account [command options] [arguments...]

OPTIONS:
   --account value, -a value  Email of the account that should be updated.
   --email value, -m value    New email for the account.
   --help, -h                 show help

While I would prefer to use an interface that makes use of positional arguments for required parameters, the interface is built around options to keep it consistent with the rest of the lego CLI interface. Since the --server option is global, it is not included in the interface of the command. While --email is also a global option, it makes sense to list it explicitly.

Since lego uses emails as account identifier, storage data should be updated as well:

  • The directory $LEGO_PATH/accounts/$LEGO_SERVER/[email protected] should be renamed.
  • All occurrences of the old email inside $LEGO_PATH/accounts/$LEGO_SERVER/[email protected]/account.json should be replaced.

Once done, the user should be reminded to update the --email option for all commands.

@ldez ldez added the area/cli label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants