Skip to content

Add newline between the command and the output when collapsible section is enabled

Thomas Chandelle requested to merge (removed):28969-printf-newline into main

What does this MR do?

Add newline after the section start and section end.

Before After
Capture_d_écran_du_2022-04-03_12-45-57 Capture_d_écran_du_2022-04-03_12-46-16

Why was this MR needed?

In !3014 (merged), echo was replaced by printf. By default, the former add a trailing newline, the latter doesn't.

What's the best way to test this MR?

Create this job:

# .gitlab-ci.yml
test_script-section:
  script:
    - echo foo
  needs: []
  variables:
    FF_SCRIPT_SECTIONS: "true"

Result before: https://gitlab.com/tchandelle/demo-pipeline-job-dependencies/-/jobs/2266467248#L27

Result after: https://gitlab.com/tchandelle/demo-pipeline-job-dependencies/-/jobs/2266483824#L26

What are the relevant issue numbers?

Closes #28969 (closed)

Edited by Thomas Chandelle

Merge request reports