From 238c9c88b5749fe71fc3e4bdca9640120359c1f8 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Tue, 30 Apr 2024 03:40:13 -0700 Subject: [PATCH] fix: Minor updates to ddev custom commands (#24) --- commands/web/drupal | 2 +- commands/web/nightwatch | 2 +- commands/web/phpunit | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/commands/web/drupal b/commands/web/drupal index cfa76f7..2e82267 100755 --- a/commands/web/drupal +++ b/commands/web/drupal @@ -5,7 +5,7 @@ #ddev-generated ## Description: Run commands from the core drupal script ## Usage: drupal -## Example: "ddev drupal --help" +## Example: ddev drupal --help\nddev drupal list\nddev drupal install demo_umami ## ExecRaw: true /** diff --git a/commands/web/nightwatch b/commands/web/nightwatch index 32095b9..eb8032c 100644 --- a/commands/web/nightwatch +++ b/commands/web/nightwatch @@ -3,7 +3,7 @@ #ddev-generated ## Description: Run Nightwatch ## Usage: nightwatch -## Example: "ddev nightwatch --tag core" +## Example: ddev nightwatch --tag core echo "Clearing old webdriver sessions" curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done diff --git a/commands/web/phpunit b/commands/web/phpunit index 2d9391f..2e6a77c 100644 --- a/commands/web/phpunit +++ b/commands/web/phpunit @@ -3,8 +3,12 @@ #ddev-generated ## Description: Run PHPUnit ## Usage: phpunit -## Example: "ddev phpunit core/modules/sdc/tests" +## Example: "ddev phpunit core/modules/field" +if ! command -v phpunit >/dev/null; then + echo "phpunit is not in PATH in the web container. You probably forgot to 'ddev composer install'" + exit 2 +fi echo "Clearing old webdriver sessions" curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done -./vendor/bin/phpunit -c core --verbose "$@" \ No newline at end of file +phpunit -c core --verbose "$@"