-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove Drupal related add-on files from .ddev
when not applicable
#27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine, but I didn't understand turning silent results into errors.
@@ -4,11 +4,11 @@ set -e | |||
|
|||
if [[ $DDEV_PROJECT_TYPE != drupal* ]] || [[ $DDEV_PROJECT_TYPE =~ ^drupal(6|7)$ ]] ; | |||
then | |||
exit 0 | |||
exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this have to be called out as an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I remove the files only if this script fails:
if ! redis/scripts/setup-drupal-settings.sh; then
# remove files
fi
That's why I return an error here.
Otherwise I would need to duplicate Drupal checks in install.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about checking to see if it's drupal and if not removing files? Rather than depending on the script? Or is that the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove the file from the file itself, will this work for all environments?
I thought it could have unpredictable results, for example, for Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll try to remove the files here and see if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for me.
I tested it again on Linux, macOS, and traditional Windows. Works perfectly. |
Thanks, sorry I didn't get back to it. |
The Issue
When people install this add-on, some Drupal related files are installed to
.ddev
folder, even when the project is not Drupal.How This PR Solves The Issue
Removes these files in
post_install_action
.Manual Testing Instructions
Files are removed for non Drupal:
Files are NOT removed for Drupal:
Automated Testing Overview
Related Issue Link(s)
Release/Deployment Notes