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

extra newline character from powershell output

XMLWordPrintable

      When i trying to wrap some powershell script output into variable, it's adds excess \n symbol to.

      Like:

      script {
      	VARI = powershell (returnStdout: true, script: """Write-Output foo""")
      	println VARI
      	}
      

      It's outputs the following:

      [Pipeline] script
      [Pipeline] {
      [Pipeline] powershell
      [Pipeline] echo
      foo
      
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      

      But powershell itself transmits output without `n .
      How to escape it in output?

            gek gek
            gek gek
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: