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

Made mjml_bin method aware of locally installed node_modules #2

Closed
wants to merge 1 commit into from
Closed

Made mjml_bin method aware of locally installed node_modules #2

wants to merge 1 commit into from

Conversation

KittyGiraudel
Copy link

Hey there,

The mjml_bin method currently returns the output of which mjml command, which works fine when the module is globally installed but would fail to retrieve a binary when only installed locally.

This pull request intends to fix that by first checking the content of the node_modules folder in the current Rails project, then falling back on which if there is no local mjml.

One question though would be: do we have access to Rails in this file?

Ping @pgoetze.

@KittyGiraudel
Copy link
Author

Damn, testes are failing. I will require your assistance here @sighmon. :)

@sighmon
Copy link
Owner

sighmon commented Jun 9, 2016

Hey @hugogiraudel & @pgoetze, cool idea - we re-implemented it so that it locates the MJML executable and checks the version at require time to avoid crashing at runtime.

We also avoided using /usr/bin/which mjml in the hope it'll work on more operating systems (whispers Windows).

What do you think?

@sighmon sighmon closed this Jun 9, 2016
sighmon pushed a commit that referenced this pull request May 28, 2018
sighmon added a commit that referenced this pull request Jan 20, 2023
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