Skip to content

Commit

Permalink
consolidate help command
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Nov 21, 2024
1 parent fccd816 commit 8060b5f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions internal/exec/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 8060b5f

Please sign in to comment.