commands/mod: Ignore invalid module path

This commit is contained in:
Razon Yang
2024-02-22 23:00:03 +08:00
committed by GitHub
parent 16406d9d77
commit f5fd7ec8cc
2 changed files with 4 additions and 2 deletions

View 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())