diff --git a/uncrust.go b/uncrust.go index 2a7f904..c08a5d9 100644 --- a/uncrust.go +++ b/uncrust.go @@ -56,11 +56,12 @@ func main() { cmd.Stdout = stdout cmd.Stderr = stderr + samfile = filepath.Base(samfile) + if e = cmd.Run(); e != nil { if _, ok := e.(*exec.ExitError); ok { str := stderr.String() if len(samfile) != 0 { - samfile = "./" + filepath.Base(samfile) str = strings.ReplaceAll(str, "stdin, open_line is ", samfile+":") str = pos_rx.ReplaceAllString(str, fmt.Sprintf("%s:$1:#$2", samfile)) } @@ -117,7 +118,7 @@ func main() { func pretty(e []textdiff.Edit, p string) string { b := &bytes.Buffer{} for _, e := range e { - fmt.Fprintf(b, "%s:#%d,#%d\n", p, e.Start, e.End) + fmt.Fprintf(b, "%s:#%d,#%d: »%s«\n", p, e.Start, e.End, e.New) } return b.String() }