From 7660d8d0860c5c29617025aec1a2cd94d002afbc Mon Sep 17 00:00:00 2001 From: Liam Cervante Date: Wed, 21 Aug 2024 09:32:08 +0200 Subject: [PATCH] stacks: fix suggested command when lock file is out of date (#35616) --- .../stacks/stackruntime/internal/stackeval/provider_config.go | 2 +- internal/stacks/stackruntime/validate_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/stacks/stackruntime/internal/stackeval/provider_config.go b/internal/stacks/stackruntime/internal/stackeval/provider_config.go index e67031c891..de1c269675 100644 --- a/internal/stacks/stackruntime/internal/stackeval/provider_config.go +++ b/internal/stacks/stackruntime/internal/stackeval/provider_config.go @@ -91,7 +91,7 @@ func CheckProviderInLockfile(locks depsfile.Locks, providerType *ProviderType, d Severity: hcl.DiagError, Summary: "Provider missing from lockfile", Detail: fmt.Sprintf( - "Provider %q is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks provider lock` to update the lockfile and run this operation again with an updated configuration.", + "Provider %q is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks providers lock` to update the lockfile and run this operation again with an updated configuration.", providerType.Addr(), ), Subject: declRange.ToHCL().Ptr(), diff --git a/internal/stacks/stackruntime/validate_test.go b/internal/stacks/stackruntime/validate_test.go index 95b719b386..57af8ee681 100644 --- a/internal/stacks/stackruntime/validate_test.go +++ b/internal/stacks/stackruntime/validate_test.go @@ -486,7 +486,7 @@ func TestValidate_missing_provider_from_lockfile(t *testing.T) { t.Fatalf("expected diagnostic summary 'Provider missing from lockfile', got %q", diag.Description().Summary) } - if diag.Description().Detail != "Provider \"registry.terraform.io/hashicorp/testing\" is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks provider lock` to update the lockfile and run this operation again with an updated configuration." { + if diag.Description().Detail != "Provider \"registry.terraform.io/hashicorp/testing\" is not in the lockfile. This provider must be in the lockfile to be used in the configuration. Please run `tfstacks providers lock` to update the lockfile and run this operation again with an updated configuration." { t.Fatalf("expected diagnostic detail to be a specific message, got %q", diag.Description().Detail) } }