Skip to content

Commit e438605

Browse files
Junha Yangmergify[bot]
authored andcommitted
Use log only when environment variable is given
1 parent 026deca commit e438605

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

integration-test/src/lib.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,19 @@ pub fn run_node(
6969
let path = std::fs::canonicalize(foundry_path).expect("Can't find foundry binary");
7070
let mut command = Command::new(path);
7171
let id = ID_COUNT.fetch_add(1, Ordering::SeqCst);
72-
let LogFiles {
73-
stdout,
74-
stderr,
75-
} = create_log_files(id);
72+
73+
if let Ok(x) = std::env::var("USE_LOG") {
74+
if x == "1" {
75+
let LogFiles {
76+
stdout,
77+
stderr,
78+
} = create_log_files(id);
79+
command.stdout(stdout).stderr(stderr);
80+
}
81+
}
7682

7783
command
7884
.env("RUST_LOG", rust_log)
79-
.stdout(stdout)
80-
.stderr(stderr)
8185
.arg("--app-desc-path")
8286
.arg(app_desc_path)
8387
.arg("--link-desc-path")

0 commit comments

Comments
 (0)