]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
commands/mod: Ignore invalid module path
authorRazon Yang <razonyang@gmail.com>
Thu, 22 Feb 2024 15:00:03 +0000 (23:00 +0800)
committerGitHub <noreply@github.com>
Thu, 22 Feb 2024 15:00:03 +0000 (16:00 +0100)
modules/client.go
testscripts/commands/mod_get_u.txt

index c3371e0d48cc59af445eebfa138c44411e26350f..f358f3f75d439893876b5d33bea39e7e3d571457 100644 (file)
@@ -325,7 +325,7 @@ func (c *Client) Get(args ...string) error {
                                return coll.err
                        }
                        for _, m := range mc.AllModules {
-                               if m.Owner() == nil {
+                               if m.Owner() == nil || !isProbablyModule(m.Path()) {
                                        continue
                                }
                                modules = append(modules, m.Path())
index b070309e0f84490d01b32ae4361fe41fc2e4c347..f3efc0c1b112c339408f4e8d7cac0897828f99cb 100644 (file)
@@ -4,6 +4,7 @@ stdout 'commonmod@v1.0.1.*commonmod2@v1.0.2'
 
 -- hugo.toml --
 title = "Hugo Modules Update Test"
+theme = ["my-theme"]
 [module]
 [[module.imports]]
 path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
@@ -17,4 +18,5 @@ require (
   github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.1.0 // indirect
   github.com/gohugoio/hugo-mod-integrationtests/commonmod v0.0.0-20230823103305-919cefe8a425 // indirect
 )
-
+-- themes/my-theme/dummy.txt --
+MY THEME