Skip to content

Commit

Permalink
Rollup merge of rust-lang#39660 - alexcrichton:shasum-dirs, r=brson
Browse files Browse the repository at this point in the history
Don't include directory names in shasums

Right now we just run `shasum` on an absolute path but right now the shasum
files only include filenames, so let's use `current_dir` and just the file name
to only have the file name emitted.
  • Loading branch information
frewsxcv authored Feb 11, 2017
2 parents 864d206 + 67574cc commit 0052928
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ impl Builder {
fn hash(&self, path: &Path) -> String {
let sha = t!(Command::new("shasum")
.arg("-a").arg("256")
.arg(path)
.arg(path.file_name().unwrap())
.current_dir(path.parent().unwrap())
.output());
assert!(sha.status.success());

Expand Down

0 comments on commit 0052928

Please sign in to comment.