WSL not available for hosted Windows machine


We are having trouble to build our project on GitHub hosted Windows machine lately, as it fails as soon as we try to run bash from one of our script:

[INFO] bash D:\a\java\java\tensorflow-core\tensorflow-core-api/ 
Windows Subsystem for Linux has no installed distributions.

Distributions can be installed by visiting the Microsoft Store:

It was working before (our last successful build was on July 15th) so it looks it is a relatively new issue (we did not change anything in our GitHub action workflow between both builds).

From what I understand, bash should be available from the Git installation on these machines. Any help to fix this would be greatly appreciated, thank you

Thank you for your feedback.
Are you using windows-latest hosted runner? If so, according to this document: Windows Subsystem for Linux has been enabled. In your case, you could try to set a fully qualified path to a bash shell application as mentioned here.
If it is still an issue, do you have a public repo demonstrating this?Please link us the broken workflow run? Thanks

I think we’ve finally resolved the issue by removing manually the Bash installation from WSL, which was suddenly causing problems : rm.exe "C:/WINDOWS/system32/bash.EXE"

Here is a link to the job that failed and here is the workflow (updated with the fix mentioned above)

1 Like

Here is another related post: