Added a small hack to make sonic work again

This commit is contained in:
TheEssem 2020-02-20 15:08:48 -06:00
parent 1ecae70c41
commit 1c9d40041b
2 changed files with 3 additions and 3 deletions

View file

@ -1,9 +1,9 @@
// workaround for a gm bug where it doesn't output buffers properly
// https://github.com/aheckmann/gm/issues/572#issuecomment-293768810
module.exports = (data, format) => {
module.exports = (data, format, type) => {
return new Promise((resolve, reject) => {
if (format) {
data.out("-layers", "optimize").stream(format, (err, stdout, stderr) => {
data.out(type !== "sonic" ? "-layers" : "", type !=="sonic" ? "optimize" : "").stream(format, (err, stdout, stderr) => {
if (err) return reject(err);
const chunks = [];
stdout.on("data", (chunk) => {