-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix drush wrapper * bump drupal core+drush test versions * Fix test * Close #342 * Do not break folks who haven't upgrade drush yet * Update drush * update composer
- Loading branch information
Showing
6 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
DRUSH_EXECUTABLE=/var/www/drupal/vendor/bin/drush | ||
if [ -f /var/www/drupal/vendor/bin/drush.php ]; then | ||
DRUSH_EXECUTABLE=/var/www/drupal/vendor/bin/drush.php | ||
fi | ||
|
||
# Ensures drush runs as the correct user, and does not run out of memory. | ||
# Takes precedence due to order of $PATH. Preferred to an alias as it will apply | ||
# regardless of which shell is used or how it is started (login, interactive, etc) | ||
if test "$(id -u)" -eq 0; then | ||
# If root run as nginx. | ||
s6-setuidgid nginx php -d memory_limit=-1 /var/www/drupal/vendor/bin/drush "${@}" | ||
s6-setuidgid nginx php -d memory_limit=-1 "${DRUSH_EXECUTABLE}" "${@}" | ||
else | ||
# If non-root user, then run as current user | ||
# as we do not have permissions to switch user. | ||
php -d memory_limit=-1 /var/www/drupal/vendor/bin/drush "${@}" | ||
php -d memory_limit=-1 "${DRUSH_EXECUTABLE}" "${@}" | ||
fi |
This file contains 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
This file contains 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
This file contains 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
This file contains 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