Open MatthewJohn opened 3 weeks ago
Out of curiosity: what that screencast (git switch branch + open main.go in vi) is meant for? 🤔
Out of curiosity: what that screencast (git switch branch + open main.go in vi) is meant for? 🤔
Ah, I saw it in the new issue template and wondered what it was - and then forgot to remove it!
Can this wait after release 1.2.0?
Can this wait after release 1.2.0?
It probably can. Though this "bug" may impact someone's CI/CD pipeline by halting it to wait for an input w/o a meaningful reason. I'd personally target this to be release as soon as possible. Though! Though we may (and need) to establish release cadence if we may (and can) provide a more-or-less stable release cadence I guess.
Is your feature request related to a problem? Please describe.
There are two use-cases when running tfswitch:
Describe the solution you'd like
As suggested in the thread on/after https://github.com/warrensbox/terraform-switcher/pull/429#discussion_r1624655080, 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.