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

Windows runner powershell or cmd?

Nicolai Grodzitski
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!
May 3, 2024

I've added a self hosted runner and see that it works with bitbucket. So it is possible to write a meaningfull pipelines.

And there comes an essential question: does the script defined in pipeline runs in powershell or in cmd?
I very much prefer it to run CMD, but seems like it is powershell. Is there a way to start the runner and specify that I want CMD for running scripts or is there a way I can specify it in pipeline definition?

1 answer

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 5, 2024

G'day, @Nicolai Grodzitski 

We have this explained in our documentation here. Basically, the pipeline scripts using Windows Runner will use a Powershell to execute the step scripts.

Unfortunately, it's not possible to change the default behaviour at this moment. Is there any particular reason why you wish to run it in CMD?

Regards,
Syahrul

Oleksandr Ismailov
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 31, 2024

Sometimes needed to use not only CMD by default but event GitBash.
In GitLab there is such functionality so redirect shell to even gitbash on windows by special config. 
Also bitbucket still have a missed functionality for clonning with submodules policy options, only depth supported which not covers a lot of functionality.

You should remember that native windows system has still problems with handling filenames(filepaths) more than 256 symbols and iduring work with powershell it lead to addtional excersises to fix that... I mean:

git config --system core.longpaths true

Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1

Which not observed on any other systems...

PS: Power shell not very friendly with its syntax compared to linux / macos cmd so a lot of people try to keep their scripts universal that is why gitbash and MinGW it is the biggest helpers in this world for some kind of projects...
   



Suggest an answer

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

Atlassian Community Events