Skip to content

Update ScriptHandler to support symlinks #549

@SkywardRay

Description

@SkywardRay

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?

Metadata

Metadata

Labels

ScriptHandlerState: DoneThe issue is complete and waiting for a releaseType: FeatureIssue is a new feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions