Skip to content

Commit ea8ca9d

Browse files
Merge pull request #288 from nnethercote/rm-cp-T
Change a `cp` command.
2 parents 5de3228 + 3e50d2d commit ea8ca9d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

collector/src/bin/rustc-perf-collector/execute.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,14 @@ impl Benchmark {
577577
}
578578

579579
fn make_temp_dir(&self, base: &Path) -> Result<TempDir, Error> {
580+
// Appending `.` means we copy just the contents of `base` into
581+
// `tmp_dir`, rather than `base` itself.
582+
let mut base_dot = base.to_path_buf();
583+
base_dot.push(".");
580584
let tmp_dir = TempDir::new()?;
581585
let mut cmd = Command::new("cp");
582-
cmd.arg("-r")
583-
.arg("-T")
584-
.arg("--")
585-
.arg(base)
586+
cmd.arg("-R")
587+
.arg(base_dot)
586588
.arg(tmp_dir.path());
587589
command_output(&mut cmd).with_context(|_| format!("copying {} to tmp dir", self.name))?;
588590
Ok(tmp_dir)

0 commit comments

Comments
 (0)