-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin Shouldn't Overwrite Existing Files #8
Comments
thanks for these! i'll have a look and see what i can do. |
Issue #8, don't overwrite existing files.
That was FAST! |
Requesting this issue be reopened. Executing the command If the copy() function in use is PHP's default
Thoughts? |
i'll have a look when i can |
When you execute
blt recipes:vm:lando
, the following files are copied from the plugin:.lando.yml
README.md
blt/example.local.blt.yml
blt/local.blt.yml
If those files already exist, they are overwritten by the plugin.
Our carefully edited project README.md, which was setup when we initialized BLT and we have been maintaining ever since, was overwritten by the command (thank goodness for Git to restore it).
And, once I had updated and commited the .lando.yml file, when we tried the result on another developer's machine, the .lando.yml was reverted back to the plugin default.
This could be avoided by changing the 3rd argument to the copy method on lines 28, 39, 61 and 62 from TRUE (force the copy) to FALSE.
Also if you happen to execute
blt recipes:vm:lando
twice, the /sites/default/settings/local.settings.php file ends up with database credentials of drupal99. The first execution uses blt:init:settings to create the file, then does a replace in file on line 88 to change the default credentials of drupal to drupal9. The second execution doesn't force the copy during blt:init:settings so the replace in file changes the drupal9 to drupal99.The text was updated successfully, but these errors were encountered: