Running bash.exe from TeamCity
I want to execute a bash script on a Windows machine using Win10's built-in BashOnWindows.
I tried different approaches, and they fail for some reason. The simplest thing I do is just executing
bash -c ls
under PowerShell x64 runner. The script just gets stuck until I stop the build manually. Can you share some insignts for this case? Thanks.
Please sign in to leave a comment.
Did you find any solution?
I don't remember to be honest, since I have two related issues, and I am still struggling with one of them.
However, focusing on bash only, I think the problem was in TeamCity 32bit vs bash.exe 64 bit, and the way to solve it is either to run TeamCity under 64bit JRE or to use workarounds such as pointed here:
https://superuser.com/questions/1219122/run-64bit-program-from-32bit-shell
Hi Maxim, Alexey,
have you tried running it with a "command line" step by calling the bash -c from there? If it's not working, please feel free to open an issue in our tracker and provide details on what is going on: https://youtrack.jetbrains.com/issues/TW
Given how bash is now provided by default, it might be an option to integrate it as an option on the command line runner in the future, so you might want to add a feature request for it.