Skip to content

Commit 2471d45

Browse files
authored
fix: list command (go-acme#1943)
1 parent 7498a81 commit 2471d45

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmd/cmd_list.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ func createList() *cli.Command {
2828
Aliases: []string{"n"},
2929
Usage: "Display certificate common names only.",
3030
},
31+
// fake email, needed by NewAccountsStorage
32+
&cli.StringFlag{
33+
Name: "email",
34+
Value: "unknown",
35+
Hidden: true,
36+
},
3137
},
3238
}
3339
}
@@ -93,11 +99,6 @@ func listCertificates(ctx *cli.Context) error {
9399
}
94100

95101
func listAccount(ctx *cli.Context) error {
96-
// fake email, needed by NewAccountsStorage
97-
if err := ctx.Set("email", "unknown"); err != nil {
98-
return err
99-
}
100-
101102
accountsStorage := NewAccountsStorage(ctx)
102103

103104
matches, err := filepath.Glob(filepath.Join(accountsStorage.GetRootPath(), "*", "*", "*.json"))

0 commit comments

Comments
 (0)