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

Wrong EOL (UNIX type: LF) in Windows batch files executed for build steps of type "Execute Windows batch command"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Windows 2008 Server R2, Enterprise Edition, x64
    • Similar Issues:

      Description

      For a build step of type "Execute Windows batch command" Hudson generates and then executes a .bat file using the content provided by the user in the configuration textbox of the step.

      The problem is that the generated .bat file has UNIX style EOL (lines ending with LF) and the Windows Command Interpreter (CMD.EXE) requires Windows style EOLs (lines ending with CR LF) in batches, in order to interpret them correctly.

      The consequences of having UNIX style EOL in Windows batches is undetermined. Very simple batches work while more complex ones will behave erratically because CMD.EXE will consume multiple lines in one command and it will fail to find some labels.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davidruhmann David Ruhmann
                Reporter:
                bogdaniosif bogdaniosif
              • Votes:
                6 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: