renew/revoke - don't panic on wrong account (#446)

This commit is contained in:
Ian Bishop 2017-10-25 14:31:30 -05:00 committed by xenolf
parent 5a2fd5039f
commit b63985c974

View file

@ -329,8 +329,10 @@ func run(c *cli.Context) error {
} }
func revoke(c *cli.Context) error { func revoke(c *cli.Context) error {
conf, acc, client := setup(c)
conf, _, client := setup(c) if acc.Registration == nil {
logger().Fatalf("Account %s is not registered. Use 'run' to register a new account.\n", acc.Email)
}
err := checkFolder(conf.CertPath()) err := checkFolder(conf.CertPath())
if err != nil { if err != nil {
@ -355,7 +357,10 @@ func revoke(c *cli.Context) error {
} }
func renew(c *cli.Context) error { func renew(c *cli.Context) error {
conf, _, client := setup(c) conf, acc, client := setup(c)
if acc.Registration == nil {
logger().Fatalf("Account %s is not registered. Use 'run' to register a new account.\n", acc.Email)
}
if len(c.GlobalStringSlice("domains")) <= 0 { if len(c.GlobalStringSlice("domains")) <= 0 {
logger().Fatal("Please specify at least one domain.") logger().Fatal("Please specify at least one domain.")