Skip to content

Commit 82760fe

Browse files
authored
Merge pull request #1031 from cgwalters/test-skopeo-quiet
tests: Quiet skopeo --help
2 parents dc7d4cf + 6f25c06 commit 82760fe

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ostree-ext/tests/it/main.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use ostree_ext::{gio, glib};
2121
use std::borrow::Cow;
2222
use std::collections::{HashMap, HashSet};
2323
use std::io::{BufReader, BufWriter};
24-
use std::process::Command;
24+
use std::process::{Command, Stdio};
2525
use std::time::SystemTime;
2626
use xshell::cmd;
2727

@@ -35,7 +35,14 @@ const TEST_REGISTRY_DEFAULT: &str = "localhost:5000";
3535
/// Check if we have skopeo
3636
fn check_skopeo() -> bool {
3737
static HAVE_SKOPEO: OnceCell<bool> = OnceCell::new();
38-
*HAVE_SKOPEO.get_or_init(|| Command::new("skopeo").arg("--help").status().is_ok())
38+
*HAVE_SKOPEO.get_or_init(|| {
39+
Command::new("skopeo")
40+
.arg("--help")
41+
.stdout(Stdio::null())
42+
.stderr(Stdio::null())
43+
.status()
44+
.is_ok()
45+
})
3946
}
4047

4148
#[track_caller]

0 commit comments

Comments
 (0)