From 1f92bc7ef9c798fbad118dd292a142f300148492 Mon Sep 17 00:00:00 2001 From: aknysh Date: Thu, 26 Dec 2024 21:53:41 -0500 Subject: [PATCH] updates --- internal/exec/utils.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/exec/utils.go b/internal/exec/utils.go index 798a96a6e..3524103ca 100644 --- a/internal/exec/utils.go +++ b/internal/exec/utils.go @@ -1051,6 +1051,14 @@ func processArgsAndFlags(componentType string, inputArgsAndFlags []string) (sche info.SubCommand = fmt.Sprintf("state %s", additionalArgsAndFlags[1]) twoWordsCommand = true } + + // `terraform providers` commands + // https://developer.hashicorp.com/terraform/cli/commands/providers + if additionalArgsAndFlags[0] == "providers" && + u.SliceContainsString([]string{"lock", "mirror", "schema"}, additionalArgsAndFlags[1]) { + info.SubCommand = fmt.Sprintf("providers %s", additionalArgsAndFlags[1]) + twoWordsCommand = true + } } if twoWordsCommand {