mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -18,8 +18,10 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/gohugoio/hugo/common/terminal"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
@@ -27,6 +29,12 @@ import (
|
||||
|
||||
var fileErrorFormat = "\"%s:%d:%d\": %s"
|
||||
|
||||
func init() {
|
||||
if terminal.IsTerminal(os.Stdout) {
|
||||
fileErrorFormat = terminal.Notice("\"%s:%d:%d\"") + ": %s"
|
||||
}
|
||||
}
|
||||
|
||||
// LineMatcher contains the elements used to match an error to a line
|
||||
type LineMatcher struct {
|
||||
FileError FileError
|
||||
|
Reference in New Issue
Block a user