Skip to content

Commit ff5caf8

Browse files
committed
try ant on windows before ant.bat
1 parent c3cc15e commit ff5caf8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tmc-langs-java/src/ant.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ impl AntPlugin {
3434

3535
fn get_ant_executable(&self) -> &'static str {
3636
if cfg!(windows) {
37+
if let Ok(status) = Command::new("ant").arg("-version").status() {
38+
if status.success() {
39+
return "ant";
40+
}
41+
}
42+
// if ant not found on windows, try ant.bat
3743
"ant.bat"
3844
} else {
3945
"ant"

0 commit comments

Comments
 (0)