From 913ff483f0223f9423798c379375b7972de45f7c Mon Sep 17 00:00:00 2001 From: Steven Peters Date: Mon, 8 Jan 2018 00:24:02 -0800 Subject: [PATCH] Use hgpath instead of "hg" to fix --HEAD hg builds Fixes #3628. With environment filtering, hg was no longer in the path, so make sure to provide the path when calling hg commands. last_commit was the source of the problem in #3628 but I fixed source_modified_time as well. I didn't see any others with this problem. --- Library/Homebrew/download_strategy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 6c414b941a..feb518057f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1005,11 +1005,11 @@ class MercurialDownloadStrategy < VCSDownloadStrategy end def source_modified_time - Time.parse Utils.popen_read("hg", "tip", "--template", "{date|isodate}", "-R", cached_location.to_s) + Time.parse Utils.popen_read(hgpath, "tip", "--template", "{date|isodate}", "-R", cached_location.to_s) end def last_commit - Utils.popen_read("hg", "parent", "--template", "{node|short}", "-R", cached_location.to_s) + Utils.popen_read(hgpath, "parent", "--template", "{node|short}", "-R", cached_location.to_s) end private