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"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Windows 2008 Server R2, Enterprise Edition, x64

      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.

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

          bogdaniosif created issue -
          bogdaniosif made changes -
          Link New: This issue is duplicated by JENKINS-9528 [ JENKINS-9528 ]
          bogdaniosif made changes -
          Affects Version/s New: current [ 10162 ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          David Ruhmann made changes -
          Assignee New: David Ruhmann [ davidruhmann ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Daniel Beck made changes -
          Labels New: lts-candidate
          Oliver Gondža made changes -
          Labels Original: lts-candidate New: 1.580.1-fixed
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 137577 ] New: JNJira + In-Review [ 187574 ]

            davidruhmann David Ruhmann
            bogdaniosif bogdaniosif
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: