Skip to content

Commit

Permalink
Avoid duplicate error message output (#289)
Browse files Browse the repository at this point in the history
* Avoid duplicate error message output

... as the functions calling Execute*Cmd() display any error from
InitCliConfig() before exiting.

* Auto Format

Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
  • Loading branch information
stoned and cloudpossebot committed Jan 1, 2023
1 parent d1a3a8a commit 3b62c54
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -186,7 +186,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright 漏 2017-2022 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright 漏 2017-2023 [Cloud Posse, LLC](https://cpco.io/copyright)



Expand Down
1 change: 0 additions & 1 deletion internal/exec/describe_affected.go
Expand Up @@ -24,7 +24,6 @@ func ExecuteDescribeAffectedCmd(cmd *cobra.Command, args []string) error {

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/describe_stacks.go
Expand Up @@ -19,7 +19,6 @@ func ExecuteDescribeStacksCmd(cmd *cobra.Command, args []string) error {

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/helmfile.go
Expand Up @@ -22,7 +22,6 @@ func ExecuteHelmfileCmd(cmd *cobra.Command, args []string) error {

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/terraform.go
Expand Up @@ -25,7 +25,6 @@ func ExecuteTerraformCmd(cmd *cobra.Command, args []string) error {

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/terraform_generate_backend.go
Expand Up @@ -36,7 +36,6 @@ func ExecuteTerraformGenerateBackendCmd(cmd *cobra.Command, args []string) error

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/terraform_generate_backends.go
Expand Up @@ -20,7 +20,6 @@ func ExecuteTerraformGenerateBackendsCmd(cmd *cobra.Command, args []string) erro

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/terraform_generate_varfile.go
Expand Up @@ -35,7 +35,6 @@ func ExecuteTerraformGenerateVarfileCmd(cmd *cobra.Command, args []string) error

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/terraform_generate_varfiles.go
Expand Up @@ -20,7 +20,6 @@ func ExecuteTerraformGenerateVarfilesCmd(cmd *cobra.Command, args []string) erro

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/exec/validate_component.go
Expand Up @@ -21,7 +21,6 @@ func ExecuteValidateComponentCmd(cmd *cobra.Command, args []string) error {

cliConfig, err := cfg.InitCliConfig(info, true)
if err != nil {
u.PrintErrorToStdError(err)
return err
}

Expand Down

0 comments on commit 3b62c54

Please sign in to comment.