From 67574ccd5352746c8040de05f469a3bb86e2fa97 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 8 Feb 2017 15:08:30 -0800 Subject: [PATCH] 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. --- src/tools/build-manifest/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 8c15a6630a33c..8afe0cfd102b0 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -350,7 +350,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());