GitLab runner has stopped working for no apparent reason

@snim2 I found something interesting. As a test I added this to the yaml

  • bash -c “echo hi”

It failed on that line with no echo. So its as if the powershell cannot execute bash at all.

And I think I may have just figured out the issue. Installing WSL for docker added a bash.exe to the system32 folder, and its overriding the git bash as the bash command. I haven’t figured out how to make it use the git bash instead for the path, seems to default to system32 first.

@emrys90 Good catch. I’m wondering what happens if you just put bash -c "echo FLIBBLE > flibble.txt" in the YAML file? I’m just thinking here of double checking that the issue isn’t with your STDOUT (although it seems unlikely, as your build script would not have finished that quickly).

But yes, your diagnosis sounds very sensible, and you can check that on the command line by calling both versions of the Bash EXE explicitly.

FWIW I’ve never used Powershell, but I do use the Docker based Unity build system that I linked above, and although it does take a little bit of setting up, it’s always worked well for me.

I wasn’t able to figure out how to solve the PATH issue, but I renamed the bash.exe in the system32 folder and my builds are working again.

1 Like