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

Fixes #36809 - Do not clobber answers provided on the command line wi… #891

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions hooks/pre_exit/20-certs_regenerate.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
if module_enabled?('certs') && param('certs', 'regenerate').value == true
answers = kafo.config.answers
answers['certs']['regenerate'] = false
if !app_value(:noop) && !app_value(:dont_save_answers) && module_enabled?('certs') && param('certs', 'regenerate').value == true
kafo.config.modules.each do |mod|
if mod.identifier == 'certs'
mod.params_hash['regenerate'] = false
end
end

kafo.config.store(answers)
kafo.send(:store_params)
Copy link
Member Author

@ehelms ehelms Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is a bit ugly, calling into a private method. My goal here is to patch the problem first with a fix that can be cherry picked cleanly backward. The alternative is to add methods to kafo and then release a patch release and also a patch to the installer for older releases.

end