@@ -162,8 +162,8 @@ function drush_merge_engine_data(&$command) {
162162 unset($ config [$ engine_option_alias_name ]);
163163 }
164164 }
165- // Make sure that 'require-engine-capability' is always an array.
166- if (isset ($ config ['require-engine-capability ' ]) && ! is_array ($ config ['require-engine-capability ' ])) {
165+ // Convert single string values of 'require-engine-capability' to an array.
166+ if (isset ($ config ['require-engine-capability ' ]) && is_string ($ config ['require-engine-capability ' ])) {
167167 $ config ['require-engine-capability ' ] = array ($ config ['require-engine-capability ' ]);
168168 }
169169 $ command ['engines ' ][$ engine_type ] = $ config ;
@@ -239,10 +239,15 @@ function drush_merge_engine_data(&$command) {
239239 // it is assumed that the engine can satisfy all requirements.
240240 if (array_key_exists ('engine-capabilities ' , $ data )) {
241241 $ engine_is_usable = FALSE ;
242- foreach ($ config ['require-engine-capability ' ] as $ required ) {
243- // We need an engine that provides any one of the requirements.
244- if (in_array ($ required , $ data ['engine-capabilities ' ])) {
245- $ engine_is_usable = TRUE ;
242+ // If 'require-engine-capability' is TRUE instead of an array,
243+ // then only engines that are universal (do not declare any
244+ // particular capabilities) are usable.
245+ if (is_array ($ config ['require-engine-capability ' ])) {
246+ foreach ($ config ['require-engine-capability ' ] as $ required ) {
247+ // We need an engine that provides any one of the requirements.
248+ if (in_array ($ required , $ data ['engine-capabilities ' ])) {
249+ $ engine_is_usable = TRUE ;
250+ }
246251 }
247252 }
248253 }
@@ -254,7 +259,7 @@ function drush_merge_engine_data(&$command) {
254259 $ engine_data ['options ' ][$ option ]['description ' ] = array_key_exists ('description ' , $ data ) ? $ data ['description ' ] : NULL ;
255260 if ($ combine_help ) {
256261 $ engine_data ['options ' ][$ option ]['hidden ' ] = TRUE ;
257- if (drush_get_context ('DRUSH_VERBOSE ' ) || !isset ($ data ['verbose-only ' ])) {
262+ if (drush_get_context ('DRUSH_VERBOSE ' ) || ( $ default == $ engine ) || !isset ($ data ['verbose-only ' ])) {
258263 $ combine_help_data [$ engine ] = $ engine . ': ' . $ data ['description ' ];
259264 }
260265 }
0 commit comments