I started seeing this about a week ago on Travis CI. Worked around it by doing this instead:
go get -u -v github.com/kardianos/govendor
go get -u -v github.com/gohugoio/hugo
(cd $GOPATH/src/github.com/gohugoio/hugo && govendor sync && go install)
i thought i was on track with your suggestion, but now see another issue:
gocode/src/github.com/gohugoio/hugo/commands/gendocshelper.go:61: enc.SetIndent undefined (type *json.Encoder has no field or method SetIndent)
(xenial)dewey@localhost:~$ echo $?
2
is this what happens when the source is in flux (and broken), such as during normal development cycle? or should this command be obtaining the latest stable/release?
yep, i’m new to go … jumping in specifically for the purposes of banging away at hugo.
understood. but i’m trying to wrap my head around what i’m seeing. is the “\n” something that comes in via metadata from the hugo source, something fishy with govendor, or is it an underlying go issue? i understand that you may now know …
Ah, yeah I don’t know :(. I’d be interested in that, too, though… I got the impression from googling for the problem while I was trying to work around it that it’s a govendor issue, but I’m not even sure of that, much less what the underlying cause is.
i’ve run through this 3 times from start to end in fresh chroots with the same “\n” issue. there is no newline character (or “\n” pair, either) that i can find anywhere.
in case it helps to know, i’m running this in an ubuntu 16.04 chroot on a chromebook.
but i’ve used the workaround from this thread and have an executable hugo binary now, so i’m happy.
The “\n” issue is curious and I suspect you have that in your GOPATH os env.
Nope. You can see in the link I posted above (line 468) that GOPATH doesn’t contain a newline. Furthermore, I just tried reinstalling hugo from scratch locally (Fedora 26), and I see the same issue.