Skip to content

Desktop executes Script from Windows and not from WSL #14498

Open

Description

@johannesschobel

The problem

Dear GitHub Desktop Team,

thanks a lot for this awesome (!) Git Client - i really appreciate your hard work to deliver the most awesome Git Desktop Client.

I recently stumbled upon an issue, i am not sure how to properly track. I am pretty sure, that i have pinned it down to GitHub Desktop, therefore i am going to file an issue in this repository.

I am running a Windows 10 Computer with WSL2 Ubuntu installed.
My software project is stored within WSL, i.e., the code is stored directly under \\wsl$\..., however, VSCode and GitHub Desktop are installed on the Windows computer itself.

Adding husky to the repository, and being able to run GitHooks was quite difficult, because of the UNC Path issue. However, i managed to solve it by adding the DisableUNCCheck = 1 registry entry.

However, i noticed, that the husky script that is executed, is executed from the Windows Context and not from within the WSL Context. Consider the following example:

My husky commit-msg hook looks like this:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1

When executing this script from the terminal, everything works as expected.
When executing the script through GitHub Desktop (i.e., by commiting), i get an error message, that commitlint is not available. This is strange, because the package.json of my project (within the WSL context) contains @commitlint/cli as a devdependency and i can 100% confirm that it is installed properly!

When i then installed commitlint globally on my windows computer (npm i -g @commitlint/cli), everything works as expected, and my commit messages are properly linted.

Am i missing something here? Because this would imply, that i would need to install all dependencies on my windows computer again.. Or have i misconfigured the GitHub Desktop / WSL / VSCode setting somehow!?

All the best and thanks for your help,
Johannes

Release version

3.0.0

Operating system

Windows

Steps to reproduce the behavior

  1. create a repository within the wsl
  2. add husky to the repository and add the previously mentioned commit-msg hook.
  3. open the repository in GitHub Desktop, which is installed in windows
  4. be sure not to have @commitlint/cli installed on windows
  5. commit via the console in wsl -> everything works
  6. commit via GitHub Desktop from windows -> commitlint is not known

Log files

No response

Screenshots

No response

Additional context

No response

Activity

  1. aleixrodriala commented on Mar 26, 2026

    @aleixrodriala

    I've been struggling with this for a while and ended up building a fork that fixes it: GithubDesktopWSL

    Think of it like the VS Code Remote WSL extension but for GitHub Desktop. It runs a small daemon inside WSL that handles git and file operations natively over TCP instead of going through 9P.

    Operation Fork Official Speedup
    git status 2 ms 43 ms 20x
    git log 2 ms 41 ms 24x
    Open repo 16 ms 173 ms 11x

    I went with a patch-based approach so it auto-syncs with upstream releases. You can just download the installer and try it, installs side-by-side with official Desktop.

    Would love if anyone here could give it a try and let me know how it goes!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions