mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-11 05:28:20 -04:00
parent
e00fdae456
commit
0ab81896d9
@ -556,6 +556,9 @@ func (c *collector) collectModulesTXT(owner Module) error {
|
|||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
line = strings.Trim(line, "# ")
|
line = strings.Trim(line, "# ")
|
||||||
line = strings.TrimSpace(line)
|
line = strings.TrimSpace(line)
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
parts := strings.Fields(line)
|
parts := strings.Fields(line)
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return fmt.Errorf("invalid modules list: %q", filename)
|
return fmt.Errorf("invalid modules list: %q", filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user