From ebe6a47c49d704e4b1a3582cd4199c6036764132 Mon Sep 17 00:00:00 2001 From: Joachim Noreiko Date: Fri, 30 Dec 2016 08:45:10 +0000 Subject: [PATCH] Fixed boolean properties always being treated as yes in interactive mode. --- commands/module_builder/module_builder.drush.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands/module_builder/module_builder.drush.inc b/commands/module_builder/module_builder.drush.inc index 4281d62b09..d93db1c55b 100644 --- a/commands/module_builder/module_builder.drush.inc +++ b/commands/module_builder/module_builder.drush.inc @@ -845,6 +845,13 @@ function module_builder_drush_interactive_prompt($property_name, $property_info, } } + // Convert boolean property input to an actual boolean. + if ($property_info['format'] == 'boolean') { + if (in_array(strtolower($value), ['no', 'n'])) { + $value = FALSE; + } + } + // Callback to convert a value given as an index in a list of options into // the actual option value. $convert_index_to_value_callback = function($item) use ($option_by_index) {