Remove \r from new line print statments (#509)

## Changes
Removes carriage character from new line prints for json output mode and
sync events

## Tests
Manually
This commit is contained in:
shreyas-goenka 2023-06-22 13:47:52 +02:00 committed by GitHub
parent 5c23c430be
commit f2a2d058d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ func textOutput(ctx context.Context, ch <-chan sync.Event, w io.Writer) {
// Sync events produce an empty string if nothing happened.
if str := e.String(); str != "" {
bw.WriteString(str)
bw.WriteString("\r\n")
bw.WriteString("\n")
bw.Flush()
}
}

View File

@ -53,7 +53,7 @@ func renderJson(w io.Writer, v any) error {
if err != nil {
return err
}
_, err = w.Write([]byte("\r\n"))
_, err = w.Write([]byte("\n"))
return err
}

View File

@ -38,7 +38,7 @@ func isSHA1(s string) bool {
}
func LoadReferenceFile(path string) (*Reference, error) {
// read referebce file content
// read reference file content
b, err := os.ReadFile(path)
if os.IsNotExist(err) {
return nil, nil