Skip to content

Commit bf75089

Browse files
authored
Rollup merge of #39660 - alexcrichton:shasum-dirs, r=brson
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.
2 parents 17dcc51 + 67574cc commit bf75089

File tree

1 file changed

+2
-1
lines changed
  • src/tools/build-manifest/src

1 file changed

+2
-1
lines changed

src/tools/build-manifest/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ impl Builder {
362362
fn hash(&self, path: &Path) -> String {
363363
let sha = t!(Command::new("shasum")
364364
.arg("-a").arg("256")
365-
.arg(path)
365+
.arg(path.file_name().unwrap())
366+
.current_dir(path.parent().unwrap())
366367
.output());
367368
assert!(sha.status.success());
368369

0 commit comments

Comments
 (0)