Skip to content
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

Update ScriptHandler to support symlinks #549

Closed
SkywardRay opened this issue Jan 15, 2020 · 3 comments · Fixed by #551
Closed

Update ScriptHandler to support symlinks #549

SkywardRay opened this issue Jan 15, 2020 · 3 comments · Fixed by #551
Assignees
Labels
ScriptHandler State: Done The issue is complete and waiting for a release Type: Feature Issue is a new feature request

Comments

@SkywardRay
Copy link
Contributor

We use docker-project in our single command rollout of new projects. The /sites/default/files directory is created by the ScriptHandler and afterward the /sites/default/files directory is then symlinked by wodby for use with docker.

This is all working fine, the problem comes with the post-update-cmd and post-install-cmd events. They are run multiple times during our creation process and createRequiredFiles check if the /sites/default/files directory exists every times. Which causes an exception because it doesn't exist it is actually a symlink now.

I would love to fix this problem and I have come up with 2 solutions:

  • Check if directories are symlinks if they don't exist.
  • Only run the createRequiredFiles method only in the post-create-project-cmd event instead of every time.

How do you feel about this?

@leymannx
Copy link
Collaborator

Sounds good. You can simply adjust the ScriptHandler.php in your project.

@SkywardRay
Copy link
Contributor Author

I've tested locally and a simple change to the ScriptHandler would fix this problem on our end, I have made a pull request here: #551

@AlexSkrypnyk AlexSkrypnyk added Type: Feature Issue is a new feature request and removed enhancement labels May 13, 2024
@AlexSkrypnyk AlexSkrypnyk changed the title ScriptHandler::createRequiredFiles Update ScriptHandler to support symlinks May 13, 2024
@AlexSkrypnyk AlexSkrypnyk added State: Confirmed The issue was triaged and confirmed for development and removed Quick fix labels May 13, 2024
@AlexSkrypnyk
Copy link
Collaborator

Committed to both 10.x and 11.x.

@AlexSkrypnyk AlexSkrypnyk added State: Done The issue is complete and waiting for a release and removed State: Confirmed The issue was triaged and confirmed for development labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ScriptHandler State: Done The issue is complete and waiting for a release Type: Feature Issue is a new feature request
Projects
None yet
4 participants