Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14627

Empty lines in output when invoking an external tool (Windows batch or Powershell file)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 13.0.0
    • Qt Creator 3.4.1, Qt Creator 4.11.0
    • All Other Issues
    • None
    • Windows 8 64-Bit, Qt Creator Based on Qt 5.4.2 MSVC2013 32-Bit

    Description

      If a windows batch file or a powershell file get's invoked via external tool configuration, empty lines are appended to the output of the script files.
      Maybe windows line endings are not correctly handled here.

      I have attached two sample files (test.bat and test.ps1) which echo Line#1, Line#2, Line#3. If I invoke them from command line, the output is without empty lines. But if I invoke them from external tools menu, the output of the batchfile shows one empty line between the output and the output of the powershell file shows two empty lines between the outputlines (see sampleoutput below).

      Suprisingly the output of the powershell not always produces 2 empty lines, sometimes no empty line is inserted (e.g. between Line#2 and Line#3).

      If I filter the output via sed the lines are removed, but the output is delayed until the batch or powershell file are finished, which is impractically for longer running tasks.

      ------- Batch file output in pane:

      Starte externes Werkzeug "C:\Temp\test.bat"
      Line #1

      Line #2

      Line #3

      "C:\Temp\test.bat" beendet

      ------- Powershell output in Pane:

      Starte externes Werkzeug "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -f C:\Temp\test.ps1
      Line #1

      Line #2
      Line #3

      "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" beendet

      Attachments

        1. test.bat
          0.1 kB
        2. test.ps1
          0.0 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              con Eike Ziller
              jonjonas68 Johann Anhofer
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes