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?

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

              Created:
              Updated: