diff --git a/tools/collect-copyright b/tools/collect-copyright index fe8487ddd..7c82f64f2 100755 --- a/tools/collect-copyright +++ b/tools/collect-copyright @@ -538,13 +538,9 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception tap = install_receipt["source"]["tap"] if tap != "homebrew/core": raise Exception(f"Unsupported tap for formula {formula_name}: {tap}") + tap_git_commit = install_receipt["source"]["tap_git_head"] formula_rb_path = pathlib.Path(install_receipt["source"]["path"]) - # TODO(strager): Get the exact version installed, not the latest - # version. - tap_git_commit = subprocess.check_output( - ["git", "rev-parse", "HEAD"], encoding="utf-8", cwd=formula_rb_path.parent - ).rstrip("\n") formula_rb_repo_path = self._relative_path_within_git_checkout(formula_rb_path) return self.InstalledPackage(