mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-01 06:33:27 +08:00
fix(hooks): probe WSL interop PATH before hardcoded paths
Adds 'pwsh.exe' and 'powershell.exe' as candidates to leverage WSL's Windows interop PATH resolution, making the hook work with non-default WSL mount prefixes or Windows drives.
This commit is contained in:
@@ -42,7 +42,9 @@ function findPowerShell() {
|
||||
if (!isWSL()) return null;
|
||||
|
||||
const candidates = [
|
||||
'/mnt/c/Program Files/PowerShell/7/pwsh.exe', // PowerShell 7
|
||||
'pwsh.exe', // WSL interop resolves from Windows PATH
|
||||
'powershell.exe', // WSL interop for Windows PowerShell
|
||||
'/mnt/c/Program Files/PowerShell/7/pwsh.exe', // PowerShell 7 (default install)
|
||||
'/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe', // Windows PowerShell
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user