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

Add --accept-defaults flag to avoid terminal interactivity #126

Closed

Conversation

kate-goldenring
Copy link
Collaborator

fixes #125

Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
@itowlson
Copy link
Contributor

itowlson commented Oct 5, 2023

Are there no cases at the moment where a script might want to run a command and not accept the defaults, e.g. for setting up links during deploy?

@kate-goldenring
Copy link
Collaborator Author

kate-goldenring commented Oct 5, 2023

Are there no cases at the moment where a script might want to run a command and not accept the defaults, e.g. for setting up links during deploy?

@itowlson for do you mean to enable them to specify what database to link to? Would you expect something like --link label1:db1 --link label2:db2? I went with a fairly narrow scope here thinking this is a place to start to unblock removing interactivity, but if this choice makes future flexibility harder, we can definitely discuss some creative options here

@itowlson
Copy link
Contributor

itowlson commented Oct 5, 2023

For confirmation, you mentioned that we already have --yes on database deletion. Perhaps that should be our general option for non-interactive confirmations? In this case for the "change existing link" situation. (If I read it right, the default for "change existing link" is "no", so this is not accepting the defaults.)

Although now I am imagining the case where someone wants to link a label but only if that label isn't already linked. So they'd want a --no flag. Yuck. I am not sure how to tackle this.

@itowlson
Copy link
Contributor

itowlson commented Oct 5, 2023

@kate-goldenring Yeah that is the sort of conundrum I am wondering about - link to existing DBs vs create new, that kind of thing. I don't think the CI scenarios are so pressing that we need to "unblock" them (although I will probably turn out to be laughably wrong when half our E2E tests complain about it) - maybe we should take a bit more time on this? Sorry

@kate-goldenring kate-goldenring marked this pull request as draft October 5, 2023 23:04
@kate-goldenring
Copy link
Collaborator Author

closing for #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable programmatic invocation of commands without terminal interaction
2 participants