Skip to content

Multi-line command output can be un-collapsed in Job terminal output view [BASH Shell]

Status Update (2023-11-17)

  • Support for multi-line command output for the bash shell merged in 16.5

  • To enable this feature, you have to set the feature flag FF_SCRIPT_SECTIONS.

  • Multi-line command output is not currently available for pwsh. Work on that feature will be covered in follow on issue.

  • Refer to this comment for additional context on the challenges with `pwsh',

Description

As a Developer I want to be able to view multi-line commands in a Job's terminal output view So that I can see exactly what's been executed and debug a job more precisely

Multiline commands in a Job are currently collapsed in the Job's terminal output...

e.g.

$ curl -X POST -H 'Content-type: application/json' --data ' { # collapsed multi-line command

... would like to see it all.

Current behavior:

image

Proposal

  • Allow the developer to view the full command.
  • Collapse it, but allow developer to uncollapse it (maybe a UI toggle of sorts).

Links to related issues and merge requests / references

Source code in Runner which is collapsing the code: https://gitlab.com/gitlab-org/gitlab-runner/blob/master/shells/abstract.go#L390

Edited by Darren Eastman