Skip to content

Commit

Permalink
fix comments global const
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Nov 23, 2024
1 parent 1e98f42 commit a5a0f8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/exec/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ExecuteTerraformCmd(cmd *cobra.Command, args []string, additionalArgsAndFla
// ExecuteTerraform executes terraform commands
func ExecuteTerraform(info schema.ConfigAndStacksInfo) error {
// For help commands and empty subcommand, we don't need to process stacks
if info.NeedHelp || info.SubCommand == "help" || info.SubCommand == "--help" || info.SubCommand == "" {
if info.NeedHelp || info.SubCommand == cfg.HelpFlag1 || info.SubCommand == cfg.HelpFlag2 || info.SubCommand == "" {
cliConfig, err := cfg.InitCliConfig(info, false)
if err != nil {
return err
Expand Down
3 changes: 2 additions & 1 deletion internal/exec/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var (
cfg.PlanFileFlag,
cfg.HelpFlag1,
cfg.HelpFlag2,
cfg.HelpFlag3,
cfg.WorkflowDirFlag,
cfg.JsonSchemaDirFlag,
cfg.OpaDirFlag,
Expand Down Expand Up @@ -962,7 +963,7 @@ func processArgsAndFlags(componentType string, inputArgsAndFlags []string) (sche
info.SkipInit = true
}

if arg == cfg.HelpFlag1 || arg == cfg.HelpFlag2 || arg == "help" {
if arg == cfg.HelpFlag1 || arg == cfg.HelpFlag2 || arg == cfg.HelpFlag3 {
info.NeedHelp = true
// For help commands, we don't need a component or stack
info.ComponentFromArg = ""
Expand Down
1 change: 1 addition & 0 deletions pkg/config/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (

HelpFlag1 = "-h"
HelpFlag2 = "--help"
HelpFlag3 = "-help"

ComponentVendorConfigFileName = "component.yaml"
AtmosVendorConfigFileName = "vendor"
Expand Down

0 comments on commit a5a0f8f

Please sign in to comment.