spf13/viper — pull request #20 by mohae (2014-11-06 00:27:47+00:00)
Title: update to consistently use filepath instead of path and add looking in o...

...s.Getwd() for the config file to fix finding the config file in Windows issue.

This fixes https://github.com/spf13/hugo/issues/560.

All remaining uses of `path` were switched to use `filepath` for os independence.

Instead of returning an error if the config file isn't found via `findCWD()`, `os.Getwd()` is also searched. A failure here will return an error.

This is necessary because, in Windows, `findCWD()` returns the directory for the Hugo executable, which may or may not be the actual working directory that the user is in. For Windows, `os.Getwd()` returns this information.