mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
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:
@@ -159,7 +159,7 @@ func server(cmd *cobra.Command, args []string) error {
|
||||
// Watch runs its own server as part of the routine
|
||||
if serverWatch {
|
||||
watchDirs := getDirList()
|
||||
baseWatchDir := helpers.AbsPathify(viper.GetString("WorkingDir"))
|
||||
baseWatchDir := viper.GetString("WorkingDir")
|
||||
for i, dir := range watchDirs {
|
||||
watchDirs[i], _ = helpers.GetRelativePath(dir, baseWatchDir)
|
||||
}
|
||||
|
Reference in New Issue
Block a user