Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why are my pipelines suddenly failing with "command not found" errors

Jonathan Danaher April 2, 2022

My pipeline has randomly started failing. The first step reads:

- step:
  name: Build simulation
  script:
     - rsync -av --progress . dist --exclude dist
  artifacts:
     - dist/**

It's failing with the log:

+ rsync -av --progress . dist --exclude dist
bash: rsync: command not found
bash: lesspipe: command not found
bash: dircolors: command not found

First I thought it was an issue with rsync, but actually, whatever I have tried fails similarly, eg:

bash: ssh: command not found
bash: apt-get: command not found

Just to emphasis, it was initially working fine, and now it seems like the container doesn't have anything installed in it. Does anyone know what is going on here? Cheers.

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2022

Hey Jonathan,

Without being able to see your pipelines configuration, there is a possibility that you are using a variable named "PATH" somewhere in your workspace which is conflicting with the default "PATH" variable which is prepended/required for every command in pipelines and will cause this error for every command when a conflict is present.

We also have a public ticket highlighting the same - if this variable exists as a custom variable (either in deployment, repository or workspace variables), please remove or rename it and try to run the build again:
https://jira.atlassian.com/browse/BCLOUD-20162

If this is not the case, please let me know and we can open a ticket on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events