Lint failures do not print proper error message in local builds (regression in 2.359)

This issue is archived. You can view it, but you can't modify it. Learn more

      See discussion in https://github.com/jenkinsci/jenkins/pull/6948. When you have introduced a lint failure, a local build will report

      Failed to run task: 'yarn lint:ci' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)
      

      rather than giving you an informative error message. This degrades the local development experience and creates confusion. A local Maven build should not be using lint:ci; something named lint:ci should only be invoked from CI, where the lint results would be visible via the Jenkins UI. Local runs should not be using lint:ci and should print the results on the terminal.

      This was caused by https://github.com/jenkinsci/jenkins/pull/6817. Per a comment in the abovementioned thread:

      It could conditionally swap between lint:ci and lint by using a profile activated by existence of the CI environment variable

      CC NotMyFault

            Assignee:
            Basil Crow
            Reporter:
            Basil Crow
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: