author | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-05-22 13:40:58 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-05-22 13:43:28 UTC |
parent | bee7a9f193dd75545a5ca5249f7beeb8f1bf1e76 |
internal/aliases/aliases.go | +4 | -1 |
diff --git a/internal/aliases/aliases.go b/internal/aliases/aliases.go index df2e1f7..fc29951 100644 --- a/internal/aliases/aliases.go +++ b/internal/aliases/aliases.go @@ -453,12 +453,15 @@ func (v *Resolver) runExistsHook(addr string) bool { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() cmd := exec.CommandContext(ctx, v.ExistsHook, addr) - err := cmd.Run() + + out, err := cmd.CombinedOutput() + tr.Debugf("output: %q", string(out)) if err != nil { tr.Debugf("not exists: %v", err) hookResults.Add("exists:false", 1) return false } + tr.Debugf("exists") hookResults.Add("exists:true", 1) return true