-
Notifications
You must be signed in to change notification settings - Fork 19
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
Incorrect handling of binary content from stdout #43
Comments
Thanks for the PR. It also sounds like you've outgrown gulp-exec as gulp spends a lot of time loading the file contents and piping things around which you're not using. You may want to swap to:
|
Thanks for advice :) I am new to gulp and just playing with it to understand how it works. |
Hi.
gulp-exec
plugin corrupts binary data that come fromstdout
. See examplegulpfile.js
below.Here you can see
extractAlpha
task that usesconvert
CLI tool from ImageMagick distribution. It extracts alpha channel as a separate image and outputs the result to thestdout
.When I run this task I get corrupted image in the output folder. Note, that I've specified
encoding: 'binary'
option forexec
but it doesn't help.The root cause of the issue is here:
gulp-exec/index.js
Line 38 in 8f934d9
Providing an encoding when creating a
Buffer
should fix the issue.Will create PR for this soon.
This issue occurs on:
Windows 8.1, NodeJS v8.11.2
The text was updated successfully, but these errors were encountered: