modules: Adjust watch logic vs workspace use definitions

This commit is contained in:
Bjørn Erik Pedersen
2022-12-19 17:49:45 +01:00
parent 6db527483d
commit 330fa89411
3 changed files with 16 additions and 6 deletions

View File

@@ -184,5 +184,7 @@ func (m *moduleAdapter) Watch() bool {
return m.Replace().Version() == ""
}
return false
// Any module set up in a workspace file will have Indirect set to false.
// That leaves modules inside the read-only module cache.
return !m.gomod.Indirect
}