Skip to content

Commit 55988d5

Browse files
committed
pipe output from ant -version
1 parent ff5caf8 commit 55988d5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tmc-langs-java/src/ant.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::env;
1010
use std::fs::{self, File};
1111
use std::io::Write;
1212
use std::path::Path;
13-
use std::process::Command;
13+
use std::process::{Command, Stdio};
1414
use std::time::Duration;
1515
use tmc_langs_framework::{
1616
domain::{ExerciseDesc, RunResult},
@@ -34,7 +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() {
37+
if let Ok(status) = Command::new("ant")
38+
.arg("-version")
39+
.stdout(Stdio::piped())
40+
.stderr(Stdio::piped())
41+
.status()
42+
{
3843
if status.success() {
3944
return "ant";
4045
}

0 commit comments

Comments
 (0)