-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
enhancementRefactor existing code for better performance and qualityRefactor existing code for better performance and quality
Description
Is your feature request related to a problem? Please describe.
There are two use-cases when running tfswitch:
- As a local user, I wish to run tfswitch. If tfswitch runs into a problem (i.e. it cannot parse my Terraform or it thinks there's an issue with a terragrunt config file), I would like it to show a warning and continue as normal (perhaps I specified the version as an arg, or have the version defined elsewhere).
- As a CI/CD execution server, if I am expected to parse Terraform and obtain a version, if the terraform cannot be parsed, I do not wish to begin an endless loop of waiting for user input (because there won't ever be any)
Describe the solution you'd like
As suggested in the thread on/after #429 (comment), we could/should detect for a valid TTY and act accordingly. If there is no TTY, then we should fail when these errors occur, otherwise, we should continue to ask the user for input.
yermulnik
Metadata
Metadata
Assignees
Labels
enhancementRefactor existing code for better performance and qualityRefactor existing code for better performance and quality