Bitbucket Pipelines Self Hosted Mac Runner Not Seeing Alias in .bashrc

Chad Stewart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2023

Using Bitbucket pipelines with a self-hosted macos runner. I have a .bashrc file with

 

alias godot="/Applications/Godot.app/Contents/MacOS/Godot"

 

in it. However whenever that step runs I am getting an error that it can't find the godot command. If I source the bashrc  locally I can type "godot" in the command line and the program launches. However pushed commits that trigger the pipeline aren't able to find it.

 

Do I need to create a bashrc in the shared folder? Do I need to source it manually from within my yaml file?

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2023

Hi Chad and welcome to the community!

I can reproduce this issue as well and sourcing the .bashrc file in the yml doesn't seem to work either.

I am going to create a support ticket on your behalf for further investigation. You will receive shortly an email with a link to the ticket.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Mehul Ahal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 28, 2024

I have the same issue, but for Flutter. I use FVM, and in my ~/.aliases, I use define `flutter="fvm flutter"`. This works locally, even with the same bash env, reading it and working, but not from within the pipeline

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2024

Hi Mehul,

After an investigation of this issue, we found out the following:

Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see The Shopt Builtin):

Bitbucket Pipeline runs the commands as a Shell script as opposed to the Interactive shell hence the expand_aliases option is not set by default.

Please check the following knowledge base article for a solution:

If you are still experiencing issues, please create a new question in community via https://community.atlassian.com/t5/forums/postpage/board-id/bitbucket-questions and we will look into it.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events