Skip to content

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Apr 13, 2020

When the .env file is being written, this plugin currently does not wait for the finish or error event. Therefore if an error was to happen, this would not be surfaced in the build logs. Also it is important for Build plugins to await for their completion. This PR fixes this by using util.promisify(fs.writeFile).

This PR also simplifies the setEnvWithValue() function.

@ehmicky ehmicky mentioned this pull request Apr 13, 2020
23 tasks
Copy link
Owner

@cball cball left a comment

Choose a reason for hiding this comment

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

@ehmicky Thanks for the fix and cleanup. This is great! Just a quick suggestion for clarity.

Co-Authored-By: Chris Ball <[email protected]>
@ehmicky ehmicky requested a review from cball April 13, 2020 11:56
@ehmicky
Copy link
Contributor Author

ehmicky commented Apr 13, 2020

Fixed! 👍

@cball cball merged commit c4f4342 into cball:master Apr 13, 2020
@ehmicky ehmicky deleted the feat/ensure-async branch April 13, 2020 12:45
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.

2 participants