Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 242cbe9

Browse files
committed
Swallow output when looking for appropriate name
1 parent f81949a commit 242cbe9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/agent/onefuzz-task/src/check_for_update.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::process::Stdio;
2+
13
use anyhow::Result;
24
use serde_json::Value;
35

@@ -6,7 +8,16 @@ pub fn run(onefuzz_built_version: &str) -> Result<()> {
68
let common_names = ["onefuzz", "onefuzz.exe", "onefuzz.cmd"];
79
let mut valid_commands: Vec<_> = common_names
810
.into_iter()
9-
.map(|name| (name, std::process::Command::new(name).arg("-h").spawn()))
11+
.map(|name| {
12+
(
13+
name,
14+
std::process::Command::new(name)
15+
.stderr(Stdio::null())
16+
.stdout(Stdio::null())
17+
.arg("-h")
18+
.spawn(),
19+
)
20+
})
1021
.filter_map(|(name, child)| child.ok().map(|c| (name, c)))
1122
.collect();
1223

0 commit comments

Comments
 (0)