-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: add accept-defaults to new templates #695
Conversation
0f62200
to
d5a88ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on. I'd strongly encourage you to dive a little deeper into the templates crate - although it requires more code reading, I believe you'll end up at an existing function where the code has both the parameter object and designated value to hand, and is performing the existing "value > prompt" logic. Extending that to "value > accepted default > prompt" should (I hope) be a couple of lines.
Happy to chat or pair I'm not explaining myself well...
d5a88ea
to
34ad313
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - thanks! Couple of minor recommendations, but otherwise good to go!
Signed-off-by: karthik Ganeshram <karthik.ganeshram@fermyon.com>
34ad313
to
1987881
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Add optional argument
--accept-defaults
tospin new
to accept defaults where available from the template. The values file and value mentioned in the CLI still take precedence.closes #591.