mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
resource/scss: Add IncludePaths config option
Takes paths relative to the current working dir. Fixes #4921
This commit is contained in:
parent
f01505c910
commit
166483fe12
7 changed files with 100 additions and 21 deletions
|
@ -1,7 +1,9 @@
|
|||
package hugolib
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"bytes"
|
||||
|
@ -82,6 +84,20 @@ func newTestSitesBuilder(t testing.TB) *sitesBuilder {
|
|||
return &sitesBuilder{T: t, Fs: fs, configFormat: "toml", dumper: litterOptions}
|
||||
}
|
||||
|
||||
func createTempDir(prefix string) (string, func(), error) {
|
||||
workDir, err := ioutil.TempDir("", prefix)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
if runtime.GOOS == "darwin" && !strings.HasPrefix(workDir, "/private") {
|
||||
// To get the entry folder in line with the rest. This its a little bit
|
||||
// mysterious, but so be it.
|
||||
workDir = "/private" + workDir
|
||||
}
|
||||
return workDir, func() { os.RemoveAll(workDir) }, nil
|
||||
}
|
||||
|
||||
func (s *sitesBuilder) Running() *sitesBuilder {
|
||||
s.running = true
|
||||
return s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue