Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58872

Last output line of sh not printed when not terminated with newline

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: durable-task-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.164.2
      durable task 1.29
    • Similar Issues:

      Description

      Reproducer:

      node() {
        sh "printf 'one\ntwo\nthree'"
      }
      

      prints just:

      one
      two
      

      The workaround is to append EOL at the end of the sh output but it can be pretty confusing before diagnosed.

      Printing curl response this way has caused only DOCTYPE line to be printed as the rest of Jenkins markup served was on the last single line and thus not shown at all.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              olivergondza Oliver Gondža
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: