Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-18 11:27:27 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-18 11:55:00 +0300
commit93aad3c543828efca2adeb7f96cf50ae29878593 (patch)
tree6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /commands
parent5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff)
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles. Updates #8654
Diffstat (limited to 'commands')
-rw-r--r--commands/server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/server.go b/commands/server.go
index 5cb43470b..02db354ba 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -31,6 +31,8 @@ import (
"syscall"
"time"
+ "github.com/gohugoio/hugo/common/paths"
+
"github.com/pkg/errors"
"github.com/gohugoio/hugo/livereload"
@@ -275,7 +277,7 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error {
func getRootWatchDirsStr(baseDir string, watchDirs []string) string {
relWatchDirs := make([]string, len(watchDirs))
for i, dir := range watchDirs {
- relWatchDirs[i], _ = helpers.GetRelativePath(dir, baseDir)
+ relWatchDirs[i], _ = paths.GetRelativePath(dir, baseDir)
}
return strings.Join(helpers.UniqueStringsSorted(helpers.ExtractRootPaths(relWatchDirs)), ",")