Skip to content

Commit

Permalink
Merge pull request #31318 from twittyc/twittyc/terraformWorkspaceInva…
Browse files Browse the repository at this point in the history
…lidArgsReturnsNon0

Bug fix: Terraform workspace command returns zero exit code when given an invalid argument.
  • Loading branch information
jbardin committed Dec 16, 2022
2 parents 3cda7a0 + fa31949 commit d60d247
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/command/workspace_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ func (c *WorkspaceCommand) Run(args []string) int {
cmdFlags := c.Meta.extendedFlagSet("workspace")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }

c.Ui.Output(c.Help())
return 0
return cli.RunResultHelp
}

func (c *WorkspaceCommand) Help() string {
Expand Down

0 comments on commit d60d247

Please sign in to comment.