From f4746af7ef7aa1d1bf1dce9a6f3dd8e9357afc51 Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Mon, 30 Mar 2026 09:50:49 +0000 Subject: [PATCH] backport of commit 0dee789d56a97cec05ef8a78d302cbfc48b54dd9 --- internal/command/providers_lock.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/command/providers_lock.go b/internal/command/providers_lock.go index 09ee1a791d..4430565dd0 100644 --- a/internal/command/providers_lock.go +++ b/internal/command/providers_lock.go @@ -124,6 +124,10 @@ func (c *ProvidersLockCommand) Run(args []string) int { config, confDiags := c.loadConfigWithTests(".", parsedArgs.TestsDirectory) diags = diags.Append(confDiags) + if diags.HasErrors() { + c.showDiagnostics(diags) + return 1 + } reqs, hclDiags := config.ProviderRequirements() diags = diags.Append(hclDiags)