Skip to content

Commit b09714a

Browse files
kelvinzer0kelvinzer0openclaudeai
authored
fix(doctor): detect git-remote-gitlawb.exe on Windows (#10)
which_in_path() now also checks for `{name}.exe` on Windows targets, so `gl doctor` correctly finds git-remote-gitlawb on that platform. Co-authored-by: kelvinzer0 <kelvinandriancom@gmail.com> Co-authored-by: OpenClaude (mimo-v2.5-pro) <openclaude@gitlawb.com>
1 parent d09c23d commit b09714a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎crates/gl/src/doctor.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,13 @@ pub async fn run(args: DoctorArgs) -> Result<()> {
272272
/// Check if a binary name exists anywhere on PATH.
273273
fn which_in_path(name: &str) -> bool {
274274
std::env::var_os("PATH")
275-
.map(|paths| std::env::split_paths(&paths).any(|dir| dir.join(name).exists()))
275+
.map(|paths| {
276+
std::env::split_paths(&paths).any(|dir| {
277+
dir.join(name).exists()
278+
|| (cfg!(target_os = "windows")
279+
&& dir.join(format!("{name}.exe")).exists())
280+
})
281+
})
276282
.unwrap_or(false)
277283
}
278284

0 commit comments

Comments
 (0)