Fixed verbose logging

This commit is contained in:
perp 2024-07-09 19:39:40 +01:00
parent 2c479fcd1e
commit b217242514

View File

@ -108,7 +108,6 @@ var rootCmd = &cobra.Command{
// Check error // Check error
if result.Error != nil { if result.Error != nil {
// Verbose enabled
if verbose { if verbose {
log.Err(result.Error).Msg("") log.Err(result.Error).Msg("")
} }
@ -118,8 +117,10 @@ var rootCmd = &cobra.Command{
// Verify check // Verify check
if verify { if verify {
if !dns.Verify(result.Subdomain) { if !dns.Verify(result.Subdomain) {
log.Err(errors.New(fmt.Sprintf("Could not verify %s", result.Subdomain))). if verbose {
Msg("") log.Err(errors.New(fmt.Sprintf("Could not verify %s", result.Subdomain))).
Msg("")
}
return return
} }
} }