File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 542542
543543# Helper function to call `docker compose` in the right context
544544docker_compose () {
545- # Note: Apparently, using --project-directory or --file options for `docker compose` will break use of `$PWD` in
546- # compose file. Therefore, we `cd` before running `docker compose` command.
547- (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker compose " $@ " )
545+ # Note: Apparently, using --project-directory or --file options for `docker compose` will break use of `$PWD` in
546+ # compose file. Therefore, we `cd` before running `docker compose` command.
547+ (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker compose " $@ " )
548548}
549549
550550cmd=" $1 "
824824 ;;
825825
826826 drush)
827- root=/app
828- if [ -d $docker_compose_dir /web ]; then
829- root=/app/web
830- fi
831- if [ -e $docker_compose_dir /vendor/bin/drush.php ]; then
832- docker_compose exec phpfpm php /app/vendor/bin/drush.php --root=$root " $@ "
833- elif [ -e $docker_compose_dir /vendor/bin/drush ]; then
834- docker_compose exec phpfpm /app/vendor/bin/drush --root=$root " $@ "
835- else
836- docker_compose run --rm drush --root=$root " $@ "
837- fi
827+ # We use the `… phpfpm php vendor/bin/drush` to run Drush to make debugging (with Xdebug) work.
828+ # Calling `… phpfpm vendor/bin/drush` somehow does not trigger a debugging session.
829+ docker_compose exec phpfpm php vendor/bin/drush
838830 ;;
839831
840832 composer)
You can’t perform that action at this time.
0 commit comments