From 1e12303912d38f48b068c81fe201df3493a18f34 Mon Sep 17 00:00:00 2001 From: 281742759-smi <281742759+281742759-smi@users.noreply.github.com> Date: Thu, 21 May 2026 15:25:12 -0400 Subject: [PATCH] fix: use correct GitLab collapsible sections group log format --- log/group/group.spec.ts | 4 ++-- log/group/group.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/log/group/group.spec.ts b/log/group/group.spec.ts index e532b79..c139514 100644 --- a/log/group/group.spec.ts +++ b/log/group/group.spec.ts @@ -42,10 +42,10 @@ test('groups for GitLab', () => { const timestamp = Math.floor(DATE_NOW_MOCK / 1000) jest.spyOn(Date, 'now').mockImplementation(() => DATE_NOW_MOCK); const groupEnd = groupStart('foo')! - expect(process.stdout.write).toHaveBeenCalledWith(`section_start:${timestamp}:1\\r\\e[0Kfoo\r\n`); + expect(process.stdout.write).toHaveBeenCalledWith(`\x1b[0Ksection_start:${timestamp}:1\r\x1b[0Kfoo\n`); expect(process.stdout.write).toHaveBeenCalledTimes(1) groupEnd() - expect(process.stdout.write).toHaveBeenCalledWith(`section_end:${timestamp}:1\\r\\e[0K`) + expect(process.stdout.write).toHaveBeenCalledWith(`\x1b[0Ksection_end:${timestamp}:1\r\x1b[0K\n`) expect(process.stdout.write).toHaveBeenCalledTimes(2) }) diff --git a/log/group/group.ts b/log/group/group.ts index afe83b4..2cf7c34 100644 --- a/log/group/group.ts +++ b/log/group/group.ts @@ -23,8 +23,8 @@ function getLabels (groupName: string) { } else if (CI.GITLAB) { id++ return { - start: `section_start:${Math.floor(Date.now() / 1000)}:${id}\\r\\e[0K${groupName}\r\n`, - end: `section_end:${Math.floor(Date.now() / 1000)}:${id}\\r\\e[0K`, + start: `\x1b[0Ksection_start:${Math.floor(Date.now() / 1000)}:${id}\r\x1b[0K${groupName}\n`, + end: `\x1b[0Ksection_end:${Math.floor(Date.now() / 1000)}:${id}\r\x1b[0K\n`, } } else if (CI.TRAVIS) { return {