Created
May 19, 2017 11:44
-
-
Save szeidler/36c26b58f57206c35d0bc5727bbb066a to your computer and use it in GitHub Desktop.
drushrc.php for Drush Patchfile and Docker4Drupal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the site absolute filepath. Extracted from drush_site_path(). | |
function drush_get_absolute_site_path() { | |
$possible_paths = array( | |
'/var/www/drupal/web/sites/default', | |
'/var/www/html/web/sites/default', | |
'/var/www/html/sites/default', | |
); | |
foreach ($possible_paths as $path) { | |
if (file_exists($path)) { | |
return $path; | |
} | |
} | |
return FALSE; | |
} | |
$patch_path = drush_get_absolute_site_path() . '/modules/patches/patches.make'; | |
if (file_exists($patch_path)) { | |
$options['patch-file'] = $patch_path; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment