mirror of
https://github.com/go-acme/lego.git
synced 2025-01-12 20:21:14 +02:00
fix: list command (#1943)
This commit is contained in:
parent
7498a81a13
commit
2471d4582f
@ -28,6 +28,12 @@ func createList() *cli.Command {
|
|||||||
Aliases: []string{"n"},
|
Aliases: []string{"n"},
|
||||||
Usage: "Display certificate common names only.",
|
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 {
|
func listAccount(ctx *cli.Context) error {
|
||||||
// fake email, needed by NewAccountsStorage
|
|
||||||
if err := ctx.Set("email", "unknown"); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
accountsStorage := NewAccountsStorage(ctx)
|
accountsStorage := NewAccountsStorage(ctx)
|
||||||
|
|
||||||
matches, err := filepath.Glob(filepath.Join(accountsStorage.GetRootPath(), "*", "*", "*.json"))
|
matches, err := filepath.Glob(filepath.Join(accountsStorage.GetRootPath(), "*", "*", "*.json"))
|
||||||
|
Loading…
Reference in New Issue
Block a user