Skip to content

Commit

Permalink
Update plumbing/format/pktline/error.go
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
  • Loading branch information
aymanbagabas and pjbgf committed Nov 23, 2023
1 parent a8fc663 commit 2b0d610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plumbing/format/pktline/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (e *ErrorLine) Error() string {
// Encode encodes the ErrorLine into a packet line.
func (e *ErrorLine) Encode(w io.Writer) error {
p := NewEncoder(w)
return p.Encodef("ERR %s", e.Text)
return p.Encodef("%s%s", string(errPrefix), e.Text)
}

// Decode decodes a packet line into an ErrorLine.
Expand Down

0 comments on commit 2b0d610

Please sign in to comment.