generated from ddev/ddev-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem?
The current file search script works well for projects with a fixed docroot (e.g., docroot/modules/custom), but it doesn’t automatically detect the docroot configured in DDEV projects. In projects where web is used as the docroot, the script fails or requires manual changes.
Describe your solution
Read the docroot value from .ddev/config.yaml and use it dynamically in the script. This would:
- Make the script project-agnostic
- Avoid errors like unbound variable
- Automatically include modules and themes from the correct root
Example:
local docroot=$(grep '^docroot:' .ddev/config.yaml | awk '{print $2}') || docroot="docroot" find "$docroot/modules/custom" "$docroot/themes/custom" \ -type f \ -regextype posix-extended \ -regex ".*\.($ext_pattern)$" \ -not -path "*/node_modules/*"
Describe alternatives
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request