From 93aad3c543828efca2adeb7f96cf50ae29878593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 18 Jun 2021 10:27:27 +0200 Subject: Split out the puthe path/filepath functions into common/paths So they can be used from the config package without cyclic troubles. Updates #8654 --- commands/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commands') 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)), ",") -- cgit v1.2.3