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

Can't require Ruby library when calling Mustache from CMake #239

Open
hartogjr opened this issue Jan 10, 2018 · 0 comments
Open

Can't require Ruby library when calling Mustache from CMake #239

hartogjr opened this issue Jan 10, 2018 · 0 comments

Comments

@hartogjr
Copy link

hartogjr commented Jan 10, 2018

For some reason, options are not parsed (including the -r option) when stdin is not a tty. This is likely due to line 99 in bin/mustache:
Mustache::CLI.parse_options(ARGV) if $stdin.tty?

This inhibits loading of Ruby libraries (or in my case, my own gem to add some processing options to the templates) when mustache is being called from CMake. This is because CMake provides mustache with a stdin that is not a tty.

Tried to fix this by simply removing the if-statement at the end, this works. So line 99 would become:
Mustache::CLI.parse_options(ARGV)

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

No branches or pull requests

1 participant