SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2296

BAT script does not always return the exit code

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: SONAR-RUNNER-1.3
    • Fix Version/s: SONAR-RUNNER-2.1
    • Component/s: SonarQube Runner
    • Labels:
      None
    • Number of attachments :
      0

      Description

        Issue Links

          Activity

          Hide
          Julien HENRY added a comment -

          Suggested fix applied without any test. I have asked Eric for a way to test it.

          Show
          Julien HENRY added a comment - Suggested fix applied without any test. I have asked Eric for a way to test it.
          Hide
          Julien HENRY added a comment -

          Finally I choose to mimic what is done in mvn.bat as it is already widely used. In order to test the return code in Windows cmd just do:

          > sonar-runner
          [... any error]
          > echo %ERRORLEVEL%
          1
          

          Just take care to reset the error level between each test (for example by running another command):

          > mvn -v
          [...]
          > echo %ERRORLEVEL%
          0
          
          Show
          Julien HENRY added a comment - Finally I choose to mimic what is done in mvn.bat as it is already widely used. In order to test the return code in Windows cmd just do: > sonar-runner [... any error] > echo %ERRORLEVEL% 1 Just take care to reset the error level between each test (for example by running another command): > mvn -v [...] > echo %ERRORLEVEL% 0
          Hide
          Fabrice Bellingard added a comment -

          Manually tested.

          Show
          Fabrice Bellingard added a comment - Manually tested.
          Hide
          Julien HENRY added a comment -

          Some ITs are checking the return value and we are running them on Windows

          Show
          Julien HENRY added a comment - Some ITs are checking the return value and we are running them on Windows

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Fabrice Bellingard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: