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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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())