From 2471d4582f19e7737617c99863cf277b260084ad Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Thu, 22 Jun 2023 23:20:36 +0200 Subject: [PATCH] fix: list command (#1943) --- cmd/cmd_list.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/cmd_list.go b/cmd/cmd_list.go index 90a15077..271e9299 100644 --- a/cmd/cmd_list.go +++ b/cmd/cmd_list.go @@ -28,6 +28,12 @@ func createList() *cli.Command { Aliases: []string{"n"}, Usage: "Display certificate common names only.", }, + // fake email, needed by NewAccountsStorage + &cli.StringFlag{ + Name: "email", + Value: "unknown", + Hidden: true, + }, }, } } @@ -93,11 +99,6 @@ func listCertificates(ctx *cli.Context) error { } func listAccount(ctx *cli.Context) error { - // fake email, needed by NewAccountsStorage - if err := ctx.Set("email", "unknown"); err != nil { - return err - } - accountsStorage := NewAccountsStorage(ctx) matches, err := filepath.Glob(filepath.Join(accountsStorage.GetRootPath(), "*", "*", "*.json"))