{"record":{"id":"ae92faa14a6b4602","repo":"gitbutlerapp/gitbutler","slug":"for-wsl2-projects-install-the-linux-version-of-gi","errorCode":null,"errorMessage":"For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro.","messagePattern":"For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"apps/desktop/src/lib/project/projectsService.ts","lineNumber":175,"sourceCode":"\t\t}\n\t}\n\n\tasync getValidPath(): Promise<string | undefined> {\n\t\tconst path = await this.promptForDirectory();\n\t\tif (!path) return undefined;\n\t\tif (!this.validateProjectPath(path)) return undefined;\n\t\treturn path;\n\t}\n\n\tvalidateProjectPath(path: string) {\n\t\t// These two paths represent unsupported-configuration guidance, not\n\t\t// runtime errors. Surface them as info toasts so they don't pollute\n\t\t// error telemetry — they previously accounted for 53 + many events\n\t\t// of noisy toast:show_error captures.\n\t\tif (/^\\\\\\\\wsl.localhost/i.test(path)) {\n\t\t\tconst message =\n\t\t\t\t\"For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro.\";\n\t\t\tconsole.warn(message);\n\t\t\tshowToast({\n\t\t\t\tstyle: \"info\",\n\t\t\t\ttitle: \"Use the Linux version of GitButler\",\n\t\t\t\tmessage,\n\t\t\t});\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (/^\\\\\\\\/i.test(path)) {\n\t\t\tconst message =\n\t\t\t\t\"Using git across a network is not recommended. Either clone \" +\n\t\t\t\t\"the repo locally, or use the NET USE command to map a \" +\n\t\t\t\t\"network drive.\";\n\t\t\tconsole.warn(message);\n\t\t\tshowToast({\n\t\t\t\tstyle: \"info\",\n\t\t\t\ttitle: \"UNC paths are not directly supported\",","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/apps/desktop/src/lib/project/projectsService.ts#L157-L193","documentation":"validateProjectPath in the desktop app's projectsService detects a Windows WSL2 UNC path (\\\\wsl.localhost\\...) and surfaces an info toast advising the user to install the Linux build of GitButler inside the WSL2 distro instead of adding the path from the Windows side. The Windows desktop app cannot manage repos living inside a WSL2 filesystem over the UNC share.","triggerScenarios":"Calling validateProjectPath (via getValidPath, e.g. the Add Project dialog) with a path matching /^\\\\\\\\wsl.localhost/i, such as \\\\wsl.localhost\\Ubuntu\\home\\user\\repo.","commonSituations":"Windows users who cloned a repo inside WSL2 and try to add it to the Windows GitButler app; mixed Windows/WSL2 development setups; docs/forum-recommended flows that expose WSL paths via Explorer.","solutions":["Install the Linux version of GitButler inside the WSL2 distro and add the project there (e.g. the CLI/TUI or Linux desktop build).","Alternatively clone the repository onto a Windows-native path (e.g. C:\\dev\\repo) if you want to use the Windows app.","Avoid accessing the repo through \\\\wsl.localhost in Windows tooling - git performance and locking are unreliable across that boundary."],"exampleFix":"// before (Windows app)\naddProject(\"\\\\\\\\wsl.localhost\\\\Ubuntu\\\\home\\\\me\\\\repo\")\n// after (inside WSL2)\n$ gitbutler-cli add /home/me/repo   // Linux build inside the distro","handlingStrategy":"validation","validationCode":"function isWslPath(path: string): boolean {\n  return /^\\\\\\\\wsl(\\.localhost|\\$)\\\\/i.test(path);\n}\nif (isWslPath(candidatePath)) {\n  // route to the Linux GitButler inside the distro instead\n}","typeGuard":"const isWslUncPath = (p: string): p is `\\\\\\\\wsl.localhost\\\\${string}` =>\n  /^\\\\\\\\wsl\\.localhost\\\\/i.test(p);","tryCatchPattern":null,"preventionTips":["Keep WSL2 repos inside the distro and manage them with the Linux GitButler build.","Clone to a Windows-native path when you must use the Windows app.","Never point Windows git tooling at \\\\wsl.localhost - performance and file locking degrade."],"tags":["wsl2","windows","unsupported-path","project-validation"],"backgroundTag":"unsupported-platform","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}