Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown workspace sub-command should bail with non-zero exit code #31317

Closed
bengaywins opened this issue Jun 24, 2022 · 3 comments · Fixed by #31318
Closed

Unknown workspace sub-command should bail with non-zero exit code #31317

bengaywins opened this issue Jun 24, 2022 · 3 comments · Fixed by #31318
Labels
bug new new issue not yet triaged v1.2 Issues (primarily bugs) reported against v1.2 releases

Comments

@bengaywins
Copy link

bengaywins commented Jun 24, 2022

Terraform Version

Terraform v1.2.3
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.20.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.11.0
+ provider registry.terraform.io/hashicorp/tls v3.4.0

Terraform Configuration Files

N/A

Debug Output

N/A

Expected Behavior

If I run terraform workspace seleect foo, it should bail with non-zero exit code.

Actual Behavior

It bails with a 0 exit code.

Steps to Reproduce

  1. Run terraform workspace seleect foo
  2. echo $?

Additional Context

I had this misspelled in a Makefile which is why I caught this. It just continues instead of failing.

References

N/A

@bengaywins bengaywins added bug new new issue not yet triaged labels Jun 24, 2022
@bengaywins bengaywins changed the title Unknown command should bail with non-zero exit code in workspace cmd Unknown workspace sub-command should bail with non-zero exit code Jun 24, 2022
@bengaywins
Copy link
Author

The offending issue is here.

@crw
Copy link
Collaborator

crw commented Jun 27, 2022

Thanks for this report!

@apparentlymart apparentlymart added the v1.2 Issues (primarily bugs) reported against v1.2 releases label Sep 16, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug new new issue not yet triaged v1.2 Issues (primarily bugs) reported against v1.2 releases
Projects
None yet
3 participants