mfg
This commit is contained in:
17
.ddev/.global_commands/web/craft
Executable file
17
.ddev/.global_commands/web/craft
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
#ddev-generated
|
||||
## Description: Run Craft CMS command inside the web container
|
||||
## Usage: craft [flags] [args]
|
||||
## Example: "ddev craft db/backup" or "ddev craft db/backup ./my-backups" (see https://craftcms.com/docs/4.x/console-commands.html)
|
||||
## ProjectTypes: craftcms,php
|
||||
## ExecRaw: true
|
||||
|
||||
if [ "${DDEV_PROJECT_TYPE}" != "craftcms" ]; then
|
||||
echo "The craft command is only available in the craftcms project type. You can update this in your project's config file, followed by restarting the DDEV project."
|
||||
else
|
||||
CRAFT_CMD_ROOT=${CRAFT_CMD_ROOT:="./"}
|
||||
|
||||
cd "${CRAFT_CMD_ROOT}"
|
||||
php craft "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user