← Back to PRs

#9516: fix(skills): detect Windows executables with extensions

by yhl10000 open 2026-02-05 09:19 View on GitHub →
agents stale
## Summary On Windows, the `hasBinary()` function failed to detect installed executables because it searched for exact names (e.g., `gh`) instead of names with extensions (e.g., `gh.exe`). This caused skills like GitHub to show "Missing: bin:gh" in the dashboard even when the CLI was properly installed. ## Changes - Updated `hasBinary()` in `src/agents/skills/config.ts` to check common Windows executable extensions (`.exe`, `.cmd`, `.bat`, `.com`) when running on Windows - Only applies when the binary name doesn't already have an extension - No behavior change on non-Windows platforms ## Testing Verified manually on Windows 11 (x64): ``` process.platform: win32 process.arch: x64 gh found: true (via gh.exe) ``` <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Updates `hasBinary()` to improve Windows detection by checking `PATHEXT`-based executable extensions (e.g., `.exe`, `.cmd`) when probing entries in `PATH`. - Avoids extension-probing when the requested binary already ends with one of the known executable extensions. - Leaves non-Windows behavior unchanged by defaulting to exact-name checks only. - Intended to fix skill eligibility checks that previously reported missing CLIs on Windows when only `*.exe` existed. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is small, localized to Windows-specific PATH resolution behavior, and uses PATHEXT with a reasonable fallback; no new external dependencies and non-Windows logic is unchanged. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs