You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Placeholder for bash.exe messes with CreateProcess #13277
This is similar to what CreateProcess does: the 32-bit system directory takes precedence:
The 32-bit Windows system directory. Use the GetSystemDirectoryA function function to get the path of this directory.
Expected Behavior
The appropriate bash command should run.
Actual Behavior
The wrong bash command (C:/Windows/System32/bash.exe) is run:
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
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:
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'.
The wrong bash command (C:/Windows/System32/bash.exe) is run:
This is the expected behavior. If C:/Windows/System32 is the first entry in $PATH, then C:/Windows/System32/bash.exe being invoked is the expected behavior.
Besides WSL doesn't control how PowerShell handles its $PATH logic. Closing since this is the expected behavior.
This is the expected behavior. If C:/Windows/System32 is the first entry in $PATH, then C:/Windows/System32/bash.exe being invoked is the expected behavior.
No this is not the expected behavior. The expected behavior is that C:/Windows/System32/bash.exe doesn't exist.
Besides WSL doesn't control how PowerShell handles its $PATH logic. Closing since this is the expected behavior.
This has nothing to do with PowerShell. As I very clearly explained, the command is just an example of how to reproduce the issue that happens with CreateProcess, and therefore everything is affected.
Do I need to open another issue using CreateProcess because you didn't read it correctly?
I'm facing issues with this on GitHub Windows runners as well. Why is this issue closed? Any chance we could get bash.exe removed unless a distro is installed?
Activity
github-actions commentedon Jul 23, 2025
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:
The script will output the path of the log file once done.
If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here
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'.
felipec commentedon Jul 23, 2025
WslLogs-2025-07-23_12-14-48.zip
github-actions commentedon Jul 23, 2025
Diagnostic information
sirredbeard commentedon Jul 24, 2025
What would you consider the right bash command? Are you using Git Bash?
felipec commentedon Jul 24, 2025
Whatever is the first
bashin thePATHenvironment variable. In the case of GitHub runner-images, yeah, it would be Git's bash.OneBlue commentedon Oct 17, 2025
This is the expected behavior. If
C:/Windows/System32is the first entry in $PATH, thenC:/Windows/System32/bash.exebeing invoked is the expected behavior.Besides WSL doesn't control how PowerShell handles its $PATH logic. Closing since this is the expected behavior.
felipec commentedon Oct 18, 2025
No this is not the expected behavior. The expected behavior is that
C:/Windows/System32/bash.exedoesn't exist.This has nothing to do with PowerShell. As I very clearly explained, the command is just an example of how to reproduce the issue that happens with CreateProcess, and therefore everything is affected.
Do I need to open another issue using CreateProcess because you didn't read it correctly?
joffrey-bion commentedon Jul 5, 2026
I'm facing issues with this on GitHub Windows runners as well. Why is this issue closed? Any chance we could get
bash.exeremoved unless a distro is installed?