Skip to content

Commit 018793e

Browse files
committed
example hint updated
1 parent 06353a5 commit 018793e

File tree

6 files changed

+8
-1
lines changed

6 files changed

+8
-1
lines changed

cmd/atlantis.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ var atlantisCmd = &cobra.Command{
1414
}
1515

1616
func init() {
17+
atlantisCmd.PersistentFlags().Bool("", false, doubleDashHint)
1718
RootCmd.AddCommand(atlantisCmd)
1819
}

cmd/aws.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ var awsCmd = &cobra.Command{
1414
}
1515

1616
func init() {
17+
awsCmd.PersistentFlags().Bool("", false, doubleDashHint)
1718
RootCmd.AddCommand(awsCmd)
1819
}

cmd/helmfile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func init() {
2020
// https://github.com/spf13/cobra/issues/739
2121
helmfileCmd.DisableFlagParsing = true
2222
helmfileCmd.PersistentFlags().StringP("stack", "s", "", "atmos helmfile <helmfile_command> <component> -s <stack>")
23+
helmfileCmd.PersistentFlags().Bool("", false, doubleDashHint)
2324
RootCmd.AddCommand(helmfileCmd)
2425
}
2526

cmd/markdown_help.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type ExampleContent struct {
1616
Suggestion string
1717
}
1818

19+
var doubleDashHint string = "Double dashes can be used to signify the end of Atmos-specific options and the beginning of additional native arguments and flags for the specific command being run."
20+
1921
var examples map[string]ExampleContent = map[string]ExampleContent{
2022
"atmos_terraform": {
2123
Content: terraform,

cmd/terraform.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var terraformCmd = &cobra.Command{
1818
Short: "Execute Terraform commands (e.g., plan, apply, destroy) using Atmos stack configurations",
1919
Long: `This command allows you to execute Terraform commands, such as plan, apply, and destroy, using Atmos stack configurations for consistent infrastructure management.`,
2020
FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: true},
21+
Example: `atmos terraform [sub-command] <component> -s <stack>`,
2122
PostRunE: func(cmd *cobra.Command, args []string) error {
2223
info := getConfigAndStacksInfo("terraform", cmd, args)
2324
return hooks.RunE(cmd, args, &info)
@@ -50,6 +51,7 @@ func init() {
5051
// https://github.com/spf13/cobra/issues/739
5152
terraformCmd.DisableFlagParsing = true
5253
terraformCmd.PersistentFlags().StringP("stack", "s", "", "atmos terraform <terraform_command> <component> -s <stack>")
54+
terraformCmd.PersistentFlags().Bool("", false, doubleDashHint)
5355
attachTerraformCommands(terraformCmd)
5456
RootCmd.AddCommand(terraformCmd)
5557
}

tests/test-cases/help-and-usage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,4 @@ tests:
566566
- "--check"
567567
- "--non-existent"
568568
expect:
569-
exit_code: 1
569+
exit_code: 1

0 commit comments

Comments
 (0)