From 8060b5f03b2364edfb8622cdfd3c620d58a50dbd Mon Sep 17 00:00:00 2001 From: Cerebrovinny Date: Thu, 21 Nov 2024 13:58:52 +0000 Subject: [PATCH] consolidate help command --- internal/exec/terraform.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/internal/exec/terraform.go b/internal/exec/terraform.go index 232903ea7..87894cfad 100644 --- a/internal/exec/terraform.go +++ b/internal/exec/terraform.go @@ -35,8 +35,7 @@ func ExecuteTerraformCmd(cmd *cobra.Command, args []string, additionalArgsAndFla // ExecuteTerraform executes terraform commands func ExecuteTerraform(info schema.ConfigAndStacksInfo) error { - // Don't require config to process the terraform command - if info.NeedHelp { + if info.NeedHelp || info.SubCommand == "" { fmt.Println() err := tuiUtils.PrintStyledText("ATMOS") if err != nil { @@ -57,23 +56,6 @@ func ExecuteTerraform(info schema.ConfigAndStacksInfo) error { return err } - // If the user just types `atmos terraform`, print Atmos logo and show terraform help - if info.SubCommand == "" { - fmt.Println() - err = tuiUtils.PrintStyledText("ATMOS") - if err != nil { - return err - } - - err = processHelp(cliConfig, "terraform", "") - if err != nil { - return err - } - - fmt.Println() - return nil - } - info, err = ProcessStacks(cliConfig, info, true, true) if err != nil { return err