Skip to content

Instantly share code, notes, and snippets.

@rodrigoaguilera
Created February 21, 2017 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigoaguilera/9821637c11ec53f46407d6c6eee17b8e to your computer and use it in GitHub Desktop.
Save rodrigoaguilera/9821637c11ec53f46407d6c6eee17b8e 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';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment