]> git.lizzy.rs Git - rust.git/commitdiff
Don't include directory names in shasums
authorAlex Crichton <alex@alexcrichton.com>
Wed, 8 Feb 2017 23:08:30 +0000 (15:08 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 8 Feb 2017 23:08:30 +0000 (15:08 -0800)
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

index 8c15a6630a33c9139787177ed56a99b74cbc6449..8afe0cfd102b056fa7241787dc40e6c688e11df1 100644 (file)
@@ -350,7 +350,8 @@ fn version(&self, component: &str, target: &str) -> String {
     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());