"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/collect.go" between
hugo-0.80.0.tar.gz and hugo-0.81.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

collect.go  (hugo-0.80.0):collect.go  (hugo-0.81.0)
skipping to change at line 279 skipping to change at line 279
mod = c.gomods.GetByPath(modulePath) mod = c.gomods.GetByPath(modulePath)
if mod != nil { if mod != nil {
moduleDir = mod.Dir moduleDir = mod.Dir
} }
} }
// Fall back to project/themes/<mymodule> // Fall back to project/themes/<mymodule>
if moduleDir == "" { if moduleDir == "" {
var err error var err error
moduleDir, err = c.createThemeDirname(modulePath, owner.projectMod) moduleDir, err = c.createThemeDirname(modulePath, owner.projectMod || moduleImport.pathProjectReplaced)
if err != nil { if err != nil {
c.err = err c.err = err
return nil, nil return nil, nil
} }
if found, _ := afero.Exists(c.fs, moduleDir); !fo und { if found, _ := afero.Exists(c.fs, moduleDir); !fo und {
c.err = c.wrapModuleNotFound(errors.Error f(`module %q not found; either add it as a Hugo Module or store it in %q.`, modu lePath, c.ccfg.ThemesDir)) c.err = c.wrapModuleNotFound(errors.Error f(`module %q not found; either add it as a Hugo Module or store it in %q.`, modu lePath, c.ccfg.ThemesDir))
return nil, nil return nil, nil
} }
} }
} }
skipping to change at line 534 skipping to change at line 534
for scanner.Scan() { for scanner.Scan() {
// # github.com/alecthomas/chroma v0.6.3 // # github.com/alecthomas/chroma v0.6.3
line := scanner.Text() line := scanner.Text()
line = strings.Trim(line, "# ") line = strings.Trim(line, "# ")
line = strings.TrimSpace(line) line = strings.TrimSpace(line)
parts := strings.Fields(line) parts := strings.Fields(line)
if len(parts) != 2 { if len(parts) != 2 {
return errors.Errorf("invalid modules list: %q", filename ) return errors.Errorf("invalid modules list: %q", filename )
} }
path := parts[0] path := parts[0]
if _, found := c.vendored[path]; !found {
shouldAdd := c.Client.moduleConfig.VendorClosest
if !shouldAdd {
if _, found := c.vendored[path]; !found {
shouldAdd = true
}
}
if shouldAdd {
c.vendored[path] = vendoredModule{ c.vendored[path] = vendoredModule{
Owner: owner, Owner: owner,
Dir: filepath.Join(vendorDir, path), Dir: filepath.Join(vendorDir, path),
Version: parts[1], Version: parts[1],
} }
} }
} }
return nil return nil
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)