mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 12:49:57 +00:00
Fix newlines in logs (#3808)
This commit is contained in:
@@ -184,7 +184,7 @@ function writeLog(line: Partial<LogLine>) {
|
||||
logBuffer.value.push({
|
||||
index: line.index ?? 0,
|
||||
number: (line.index ?? 0) + 1,
|
||||
text: ansiUp.value.ansi_to_html(decode(line.text ?? '')),
|
||||
text: ansiUp.value.ansi_to_html(`${decode(line.text ?? '')}\n`),
|
||||
time: line.time ?? 0,
|
||||
type: null, // TODO: implement way to detect errors and warnings
|
||||
});
|
||||
@@ -254,7 +254,7 @@ async function download() {
|
||||
downloadInProgress.value = false;
|
||||
}
|
||||
const fileURL = window.URL.createObjectURL(
|
||||
new Blob([logs.map((line) => decode(line.data)).join('')], {
|
||||
new Blob([logs.map((line) => decode(line.data ?? '')).join('\n')], {
|
||||
type: 'text/plain',
|
||||
}),
|
||||
);
|
||||
|
Reference in New Issue
Block a user