Skip to content

Commit e1ca8e5

Browse files
committed
fix: CloudWatchLog line endings
CloudWatchLog adds a line ending to each line. `console.log` also adds a line ending. I only need one. I trimEnd and then `console.log` to ensure that the line ending is OS specific.
1 parent f202c32 commit e1ca8e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code-build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ async function waitForBuildEndTime(sdk, { id, logs }, nextToken) {
5656
const { nextForwardToken, events = [] } = cloudWatch;
5757

5858
// stdout the CloudWatchLog (everyone likes progress...)
59-
events.forEach(({ message }) => console.log(message));
59+
// CloudWatchLogs have line endings.
60+
// I trim and then log each line
61+
// to ensure that the line ending is OS specific.
62+
events.forEach(({ message }) => console.log(message.trimEnd()));
6063

6164
// We did it! We can stop looking!
6265
if (current.endTime && !events.length) return current;

0 commit comments

Comments
 (0)