[JIRA] (JENKINS-58872) Last output line of sh not printed when not terminated with newline

1 view
Skip to first unread message

ogondza@gmail.com (JIRA)

unread,
Aug 9, 2019, 4:31:04 AM8/9/19
to jenkinsc...@googlegroups.com
Oliver Gondža created an issue
 
Jenkins / Bug JENKINS-58872
Last output line of sh not printed when not terminated with newline
Issue Type: Bug Bug
Assignee: Unassigned
Components: durable-task-plugin
Created: 2019-08-09 08:30
Environment: Jenkins ver. 2.164.2
durable task 1.29
Priority: Minor Minor
Reporter: Oliver Gondža

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages