function drush_load_config_file

8.0.x drush_load_config_file($context, $config_list)
6.x drush_load_config_file($context, $config_list)
7.x drush_load_config_file($context, $config_list)
3.x drush_load_config_file($context, $config)
4.x drush_load_config_file($context, $config)
5.x drush_load_config_file($context, $config_list)
master drush_load_config_file($context, $config_list)
2 calls to drush_load_config_file()
drush_load_config in includes/
Load drushrc files (if available) from several possible locations.
_drush_sitealias_get_record in includes/
This is a continuation of drush_sitealias_get_record, above. It is not intended to be called directly.


includes/, line 153
The Drush context API implementation.


function drush_load_config_file($context, $config_list) {
  foreach ((array) $config_list as $config) {
    if (file_exists($config)) {
      $options = $aliases = $command_specific = $override = array();
      drush_log(dt('Loading drushrc "!config" into "!context" scope.', array('!config' => realpath($config), '!context' => $context)), LogLevel::BOOTSTRAP);
      $ret = @include_once($config);
      if ($ret === FALSE) {
        drush_log(dt('Cannot open drushrc "!config", ignoring.', array('!config' => realpath($config))), LogLevel::WARNING);
        return FALSE;
      if (!empty($options) || !empty($aliases) || !empty($command_specific) || !empty($override)) {
        $options = array_merge(drush_get_context($context), $options);
        $options['config-file'] = realpath($config);

        $options['command-specific'] = array_merge(isset($command_specific) ? $command_specific : array(), isset($options['command-specific']) ? $options['command-specific'] : array());

        drush_set_config_options($context, $options, $override);