Pipelines build failed with error in the build log: <command_name>: Command not found

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Pipelines build failed with the following error in the build log: <command_name>: Command not found

Solution

Possible causes:

  • The PATH variable is defined as one of the pipeline variables

Troubleshooting Steps:

Is a PATH variable defined as in Workspace, Repository, or Deployment variables?

YES

  • Defining a variable with the name PATH in Workspace, Repository, or Deployment variables overrides the default $PATH variable on the build image and results in the following error:

    <command_name>: Command not found

  • To fix the issue, avoid using "PATH" as a variable name in the workspace, repository, and deployment variable sections. Try using a detailed name that adds more context on why the variable is being used, for example: "remote_path", "web_path", "destination_path" etc.

  • Note, BCLOUD-20162 - Command not found error on Pipelines tracks a feature request to alert users on the Pipeline variable page to avoid using "PATH" as a variable name.

NO

  • Is the command being executed on the build is installed on the build image? If not, install the command on the build image. If the command is installed and still getting the error then raise a Support Ticket and share the Pipeline build URL from bitbucket.org.

Updated on March 26, 2025

Still need help?

The Atlassian Community is here for you.