ddev / ddev

Docker-based local PHP+Node.js web development environments
https://ddev.com
Apache License 2.0
2.43k stars 579 forks source link

ddev drush create module puts boilerplate code in ddev docker container instead of in git source controlled code on host #6163

Closed therobyouknow closed 3 weeks ago

therobyouknow commented 3 weeks ago

Is there an existing issue for this?

Output of ddev debug test

Expand `ddev debug test` diagnostic information ``` [COPY-PASTE HERE THE OUTPUT OF `ddev debug test`] ```

Expected Behavior

ddev create code to be put in my modules folder of my git source controlled folder

Actual Behavior

robdaviswork@192 fsa-cambridge % ddev drush generate module

 Welcome to module generator!
––––––––––––––––––––––––––––––

 Module name:
 ➤ fsa_populate

 Module machine name [fsa_populate]:
 ➤ 

 Module description:
 ➤ Calls FSA API to get date to create/update Establishment nodes

 Package [Custom]:
 ➤ 

 Dependencies (comma separated):
 ➤ 

 Would you like to create module file? [No]:
 ➤ Yes

 Would you like to create install file? [No]:
 ➤ Yes

 Would you like to create README.md file? [No]:
 ➤ Yes

 The following directories and files have been created or updated:
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
 • /var/www/html/web/modules/fsa_populate/fsa_populate.info.yml
 • /var/www/html/web/modules/fsa_populate/fsa_populate.install
 • /var/www/html/web/modules/fsa_populate/fsa_populate.module
 • /var/www/html/web/modules/fsa_populate/README.md

robdaviswork@192 fsa-cambridge % git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
robdaviswork@192 fsa-cambridge % cd /var/www/html/web/modules/
cd: no such file or directory: /var/www/html/web/modules/
robdaviswork@192 fsa-cambridge % 

Steps To Reproduce

No response

Anything else?

searched for existing issues - could not find similar:

https://github.com/ddev/ddev/issues?q=is%3Aissue+%22drush+create+module%22+

therobyouknow commented 3 weeks ago

Closed - no problem. For some reason there appears to be a (small?) delay in writing the created module files to the host. They have now appeared in the host source tree.

A new issue could be created to address the apparent delay I observed. I might come back to this later and would welcome thoughts.

rfay commented 3 weeks ago

Hi @therobyouknow - I imagine you're using Mutagen (default) on macOS. When large changes are made, there is a minor delay before those are synced to the other side.

The DDEV docs on mutagen may help you understand this behavior.

You can also ddev mutagen sync any time to force the completion of the update.