lib/convox_installer/config.rb in convox_installer-1.0.8 vs lib/convox_installer/config.rb in convox_installer-1.0.9
- old
+ new
@@ -127,10 +127,14 @@
# (e.g. securely generated passwords)
if prompt[:value]
return if config[key]
default = prompt[:value]
- config[key] = default.is_a?(Proc) ? default.call(config) : default
+ config[key] = if default.is_a?(Proc)
+ default.arity == 0 ? default.call : default.call(config)
+ else
+ default
+ end
save_config_to_file
return
end
prompt_string = prompt[:prompt] || "Please enter your #{title}: "