diff --git a/internal/terraform/rootmodule/root_module.go b/internal/terraform/rootmodule/root_module.go index 7a8f004de..9937f4474 100644 --- a/internal/terraform/rootmodule/root_module.go +++ b/internal/terraform/rootmodule/root_module.go @@ -303,23 +303,23 @@ func (rm *rootModule) PathsToWatch() []string { } func (rm *rootModule) IsKnownModuleManifestFile(path string) bool { - rm.pluginMu.RLock() - defer rm.pluginMu.RUnlock() + rm.moduleMu.RLock() + defer rm.moduleMu.RUnlock() - if rm.pluginLockFile == nil { + if rm.moduleManifestFile == nil { return false } - return rm.pluginLockFile.Path() == path + return rm.moduleManifestFile.Path() == path } func (rm *rootModule) IsKnownPluginLockFile(path string) bool { - rm.moduleMu.RLock() - defer rm.moduleMu.RUnlock() + rm.pluginMu.RLock() + defer rm.pluginMu.RUnlock() - if rm.moduleManifestFile == nil { + if rm.pluginLockFile == nil { return false } - return rm.moduleManifestFile.Path() == path + return rm.pluginLockFile.Path() == path }