Fix hugo server "Watching for changes" path display

especially when the given `--source` path is a relative directory.

Also, when `--source` is specified, make WorkingDir an absolute path
from the very beginning, to be consistent with the case when `--source`
is not given.  Otherwise, the function name helpers.AbsPathify(), which
prepends WorkingDir to a relative path, does not really make sense.

Fixes #1721
This commit is contained in:
Anthony Fok
2015-12-19 05:19:31 -07:00
parent a1d232f4b6
commit de82404d35
3 changed files with 4 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ func AbsPathify(inPath string) string {
return filepath.Clean(inPath)
}
// todo consider move workingDir to argument list
// TODO(bep): Consider moving workingDir to argument list
return filepath.Clean(filepath.Join(viper.GetString("WorkingDir"), inPath))
}