Brew Build Problem

brew reinstall --HEAD hugo   

Responds with:

src/ cannot find package   ""    in any of:
    /usr/local/Cellar/go/1.4.2/libexec/src/ (from $GOROOT)
    /private/tmp/hugo20150410-12229-52fxr7/src/ (from $GOPATH)

I know this is likely related to the go installation process, and I’ve read several threads here and elsewhere about it. None of the proposed adjustments to GOPATH and GOROOT are working for me. I have run brew update && upgrade.

My current version is v0.13-DEV BuildDate: 2015-01-28T19:01:33-06:00, and I’m not having any particular problems with it, so this isn’t urgent; but I’d like to be able to resolve it if anyone can help.

I was able to get past this error by modifying the hugo formula as follows:

diff --git a/Library/Formula/hugo.rb b/Library/Formula/hugo.rb
index 5a9ee5a..fcc564d 100644
--- a/Library/Formula/hugo.rb
+++ b/Library/Formula/hugo.rb
@@ -105,10 +105,9 @@ class Hugo < Formula
     url "",
         :revision => "1f82044938a7180f6fb6bbb3a29688d1e6dbe74b"
-  go_resource "" do
+  go_resource "" do
     url "",
-        :branch => "v0",
-        :revision => "ea925a0a47d225b2ca7f9932b01d2ed4f3ec74f6"
+        :branch => "v1.2.0"
   go_resource "" do
     url "",

I.e. change go_resource to ", change :branch to v1.2.0 and remove :revision.

With that the compilation proceeded past that point, but now I’m getting the following error, any ideas are welcome:

src/ undefined: cobra.MousetrapHelpText

cobra.MousetrapHelpText is a recent addition to Cobra ( I’m kind of confused about the brew dependency handling.

Yes, I figured out that the MousetrapHelpText was a recent addition. I also bumped into a couple of other recent changes (such as Annotations in pflag that also required updates. I finally got it to work, I have submitted a pull request against the hugo Homebrew formula:

It’s working now. Thank you very much.