mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Fix newlines in TAP stdout/stderr output
It turns out, newlines are not "printable", causing the TAP stderr/stdout output to be smushed. Also address etune's comment on pr3208.
This commit is contained in:
parent
cae572290b
commit
9312af4f79
@ -499,10 +499,12 @@ func printBashOutputs(headerprefix, lineprefix, stdout, stderr string, escape bo
|
||||
func escapeOutput(s string) (out string) {
|
||||
for _, r := range s {
|
||||
switch {
|
||||
case r == '\n':
|
||||
out += string(r)
|
||||
case !strconv.IsPrint(r):
|
||||
out += " "
|
||||
case r == ':':
|
||||
out += "\u02D0" // "ː", MODIFIER LETTER TRIANGULAR COLON
|
||||
out += "\ua789" // "꞉", modifier letter colon
|
||||
default:
|
||||
out += string(r)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user