Pass options object to internal spawn invocation #100
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had an issue similar to #9 in my windows environment.
Basically my implementation passes a cookie argument which has three parts according to the wkhtmltopdf documentation.
So
is ultimately executed on Windows as
with quotes. Instead of
without quotes.
The resolution for this case, as also noted in #9, is to pass the
windowsVerbatimArguments
option to spawn.Instead of hard coding it into the library. I figured it would be more flexible to leave it up to the implementation to pass the argument. So
becomes
It is also unfortunate that this option is not documented though it's been implemented since 2011. (nodejs/node-v0.x-archive#4259)