Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dancastellon
Copy link
Contributor

@dancastellon dancastellon commented Mar 11, 2019

Resolves #5032
Impact: minor
Type: bugfix

Issue

I discovered asset provisioning was broken when trying to create custom email templates by placing them in my plugin's private folder.

Solution

This commit copied logic from CLI to allow Reaction to start without it. In doing so, the fs-extra package that CLI uses wasn't included. fs-extra provides the copySync function that recursively copies a directory. Without it, startup was throwing an error about copySync not existing, and custom plugin private directories weren't copied over to app's private directory. The fix was to simply add the package and change an import line.

Breaking changes

None

Testing

  1. Create a custom plugin with a private directory
  2. Startup Reaction and confirm no errors after Provisioning assets...

@dancastellon dancastellon force-pushed the fix-dancastellon-plugin-assets branch from c2f038d to fdd7183 Compare March 11, 2019 17:44
Copy link
Contributor

@focusaurus focusaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dancastellon I think it would probably be sufficient to add as a dev dependency right? In a production image, I'm pretty sure the asset copying happens on build. (In fact, the prod build is probably still using the CLI.)

@dancastellon
Copy link
Contributor Author

@aldeed All set here

Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing signoff on the last commit but seems good to me otherwise

@dancastellon dancastellon force-pushed the fix-dancastellon-plugin-assets branch from ce488d6 to 1c09ea2 Compare March 12, 2019 22:01
@dancastellon
Copy link
Contributor Author

@aldeed Signed off

@aldeed aldeed merged commit 65039b4 into develop Mar 13, 2019
@aldeed aldeed deleted the fix-dancastellon-plugin-assets branch March 13, 2019 01:09
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants