I began to read the codebase of Hugo to get a better understanding of how it works and used the trial and error method to see changes. While doing this I was wondering why nothing happend.
Therefore I’ve modified this codeline which will definitively outputs an error message if no config file can be found.
I’m working on Ubuntu 15.04 and Go 1.3.3. To compile the binary I used the following steps:
- My working directoy is the Hugo repo
- The source code is the same as Git’s HEAD (so no modifications except the error message)
- Yes my $GOPATH is set (checked with
echo $GOPATH
) - I compile
main.go
withgo build main.go
- Now I run the compiled binary via
./main
- The Hugo repo doesn’t contain a config file and I should see my custom error message from above. BUT that’s not the case.