diff --git a/internal/command/meta.go b/internal/command/meta.go index 6d2cc893a4..4f812ab652 100644 --- a/internal/command/meta.go +++ b/internal/command/meta.go @@ -847,6 +847,8 @@ func (m *Meta) applyStateArguments(args *arguments.State) { func (m *Meta) checkRequiredVersion() tfdiags.Diagnostics { var diags tfdiags.Diagnostics + // Cannot use m.WorkingDir.RootModuleDir() here because + // of path normalization that happens in loadConfig. pwd, err := os.Getwd() if err != nil { diags = diags.Append(fmt.Errorf("Error getting pwd: %s", err)) @@ -881,6 +883,8 @@ func (m *Meta) checkRequiredVersion() tfdiags.Diagnostics { func (c *Meta) MaybeGetSchemas(state *states.State, config *configs.Config) (*terraform.Schemas, tfdiags.Diagnostics) { var diags tfdiags.Diagnostics + // Cannot use m.WorkingDir.RootModuleDir() here because + // of path normalization that happens in loadConfig. path, err := os.Getwd() if err != nil { diags = diags.Append(tfdiags.SimpleWarning(failedToLoadSchemasMessage))