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

Information output stream is suppressed when returnStdOut = true

XMLWordPrintable

      Given this pipelinescript:

      node {
      
        def stdout = powershell(returnStdout: true, script: '''
      
          $InformationPreference = 'Continue'
          $VerbosePreference = 'Continue'
      
          Write-Output 'Hello, World!'
          Write-Information 'Some info output.'
          Write-Warning 'WARNING!'
          Write-Verbose 'VERBOSE'
          ''')
        println stdout
      }

      I expect to see this in the console: 

      Some info output
      WARNING!
      VERBOSE
      Hello, World

      Instead I get

      WARNING!
      VERBOSE
      Cannot contact : java.nio.file.NoSuchFileException: D:\Jenkins\workspace\pipelinefiddle@tmp\durable-6939059f\output.txt
      [Pipeline] echo
      Hello, World!

      From the blog I should see info output as well. 

      The error seems related to https://issues.jenkins-ci.org/browse/JENKINS-46508

      Write-Error also works.

            Unassigned Unassigned
            av Avner Silberman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: