Updated on 2026-08-10 GMT+08:00

Incorrect Compilation Script

Symptom

A task fails, and the log contains any of the following:

[ERROR] : script returned exit code 127, exitMessage is:command run failed.

Or [ERROR] : script returned exit code 1, exitMessage is:command run failed.

Or [ERROR] : script returned exit code 2, exitMessage is:command run failed

Cause Analysis

The compilation script configured in the parameter fails to be executed.

In the Linux environment, the exit code 0 indicates success, and a non-zero value indicates failure. However, each number has a different meaning:

1: common error. Check the log or logic.

2: incorrect syntax or parameter. Verify the input and syntax of the script.

127: command not found. Check whether the system environment variable contains the command.

Solution

Solution 1: Modify the compilation script command.

  1. Access the CodeArts Check service homepage.
  2. In the navigation pane, choose Code > Check. The code check page is displayed.
  3. Click the code check task name and go to the task details page, and choose Settings > Rule Sets.
  1. Click Configuration. In the displayed dialog box, check whether the compileScriptCmd is correct.

    Note: Enter the compilation command that has been successfully executed locally.

  2. Click OK.
  1. Click Execute Check in the upper right corner to perform the check again.

Solution 2: If the script is correct, submit a service ticket and contact technical support engineers to check the build environment on the executor.