Skip to content

Commit 13ddf91

Browse files
fix: do not cat stdout from command to pipe.data
1 parent 8bb51c1 commit 13ddf91

File tree

1 file changed

+10
-5
lines changed
  • src/executor/wall_time/perf

1 file changed

+10
-5
lines changed

src/executor/wall_time/perf/mod.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,16 @@ impl PerfRunner {
172172
// Output the perf data to the profile folder
173173
let perf_data_file_path = self.get_perf_file_path(profile_folder);
174174

175-
let raw_command = format!(
176-
"set -o pipefail && {} | cat > {}",
177-
&cmd_builder.as_command_line(),
178-
perf_data_file_path.to_string_lossy()
179-
);
175+
let raw_command = if self.output_pipedata {
176+
format!(
177+
"set -o pipefail && {} | cat > {}",
178+
&cmd_builder.as_command_line(),
179+
perf_data_file_path.to_string_lossy()
180+
)
181+
} else {
182+
cmd_builder.as_command_line()
183+
};
184+
180185
let mut wrapped_builder = CommandBuilder::new("bash");
181186
wrapped_builder.args(["-c", &raw_command]);
182187

0 commit comments

Comments
 (0)