-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
Describe the bug
On Windows systems with WSL installed, GitHub desktop will run pre-commit scripts on WSL instead of running them in PowerShell regardless of which shell the user has picked to use. This results in the scripts looking for windows locations that don't exist on WSL.
Version & OS
Version 2.9.0 on Windows 10 21H1 build 19043.1081 running with WSL 2 on Ubuntu 20.04
Steps to reproduce the behavior
- Make some changes to a file in a project with a pre-commit script (I'm using the npm package husky which installs these)
- Add a commit message and try to commit
- You should get the following error
Expected behavior
GitHub desktop runs the pre-commit scripts on windows PowerShell, just like git does (tested this)
Actual behavior
The scripts are run on WSL which causes errors
Screenshots

(this path is correct for my system but may be different on others)
Logs
This log has the error multiple times, which should help.
2021-07-03.desktop.production.log
Additional context
Got this error on the repositories discordjs/discord.js and discordjs/builders (forks of them) so you can try committing on these to see if you get the same errors. I also believe this issue should have relatively high priority since I am incapable of committing through my PC (unless I use git, which is more limited on some things and harder for me)