function _make_is_override_allowed

8.0.x make.utilities.inc _make_is_override_allowed($option)
6.x make.utilities.inc _make_is_override_allowed($option)
7.x make.utilities.inc _make_is_override_allowed($option)
master make.utilities.inc _make_is_override_allowed($option)

Check if makefile overrides are allowed

Parameters

array $option: The option to check.

2 calls to _make_is_override_allowed()
_get_working_copy_option in commands/make/make.utilities.inc
Gather any working copy options.
_make_parse_info_file in commands/make/make.utilities.inc
Parse makefile recursively.

File

commands/make/make.utilities.inc, line 568
General utility functions for Drush Make.

Code

function _make_is_override_allowed($option) {
  $allow_override = drush_get_option('allow-override', 'all');

  if ($allow_override == 'all') {
    $allow_override = array();
  }
  elseif (!is_array($allow_override)) {
    $allow_override = _convert_csv_to_array($allow_override);
  }

  if ((empty($allow_override)) || ((in_array($option, $allow_override)) && (!in_array('none', $allow_override)))) {
    return TRUE;
  }
  drush_log(dt("'!option' not allowed; use --allow-override=!option or --allow-override=all to permit", array("!option" => $option)), LogLevel::WARNING);
  return FALSE;
}