Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

point bash.exe to a different bash other than WSL2 bash #11472

Closed
advnpzn opened this issue Apr 16, 2024 · 6 comments
Closed

point bash.exe to a different bash other than WSL2 bash #11472

advnpzn opened this issue Apr 16, 2024 · 6 comments

Comments

@advnpzn
Copy link

advnpzn commented Apr 16, 2024

Normally, when I run bash.exe in PowerShell, it will open WSL by default.

So, I have MSYS2(C:\msys64\usr\bin) installed for building TensorFlow. While building, it executes bash.exe to run a certain snippet of script, but it is being executed by the bash.exe that points to the WSL2, which is causing my build to fail. I would like to switch to the bash.exe from MSYS2 as default.

I'm able to solve this for now by uninstalling WSL entirely. But I do not think this solution is efficient and I would lose lots of data. Is there a way to disable the bash.exe in WSL or change precedence of which bash.exe to run?

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@advnpzn
Copy link
Author

advnpzn commented Apr 16, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

/question

Copy link

Diagnostic information
Found '/question', adding tag 'question'
Found '/feature', adding tag 'feature'

@firejox
Copy link

firejox commented Apr 16, 2024

Modify Windows PATH environment variable and put MSYS2 path in higher search order.

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 16, 2024

Indeed updating %PATH% would be the best way to solve this (make sure that the bash.exe you want is first in %PATH%).

Closing since this is not something that WSL can do.

@OneBlue OneBlue closed this as completed Apr 16, 2024
@advnpzn
Copy link
Author

advnpzn commented Apr 17, 2024

Thanks for the help guys.

Yep, moving the MSYS Env path to the top works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants