-
Notifications
You must be signed in to change notification settings - Fork 87
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
skipBinary option should be true by default #81
Comments
I would imagine that your globs would only target files you want to perform
a replacement on. `skipBinary`, to me, is a way of letting people be lazy
with their globs.
What are your thoughts on that?
|
Hi @lazd - I do see your point, but my thought is that binary files are very rarely files you perform string replacements on. In my case, the string replacement was corrupting all of my binary files. Since replacing strings in binary files is a "risky" operation, and something I'd imagine people are attempting only under specific circumstances, it seems generally safer to make users to opt in to that setting. This way, users are less likely to shoot themselves in the foot and can be lazy with their globs. |
I agree, very few use cases need to perform a string replacement in a binary file. Changing |
That makes sense, and I agree it would be a major version increase. Thank you for considering! |
Any news on that? I also have the corrupting binary files issue. |
@abdonrd then set |
1.0.0 released with |
I ran into an issue where
gulp-replace
was trying to parse binary files in my project, which lead me to discover theskipBinary
option. This is set tofalse
, by default.Why is a string replacement library trying to parse binary files, by default? I can't think of a use case where this is a sensible default. It seems far more sane to have
skipBinary
betrue
by default and, if someone needs to parse binary files, they adjust that setting tofalse
.The text was updated successfully, but these errors were encountered: