Skip to content

Instantly share code, notes, and snippets.

@rodrigoaguilera
Created May 26, 2016 09:32
Show Gist options
  • Save rodrigoaguilera/3adc30d4ef242b814e01000f0fc5fb1c to your computer and use it in GitHub Desktop.
Save rodrigoaguilera/3adc30d4ef242b814e01000f0fc5fb1c to your computer and use it in GitHub Desktop.
<?php
// Load a drushrc.php file from the 'drush' folder at the root
// of the current git repository.
exec('git rev-parse --git-dir 2> /dev/null', $output);
if (!empty($output)) {
$repo = $output[0];
$options['config'] = $repo . '/../drush/drushrc.php';
$options['include'] = $repo . '/../drush/commands';
$options['alias-path'] = $repo . '/../drush/aliases';
}
$options['variables']['language_default']->language = 'en';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment