From 8cb65efbdaf3326685ecb9a408c8336dcf135745 Mon Sep 17 00:00:00 2001 From: Mox <hexmox@gmail.com> Date: Tue, 25 Jan 2022 22:22:00 +0800 Subject: [PATCH] fix: emit error to gulp correctly --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ad8349e..f31a443 100644 --- a/index.js +++ b/index.js @@ -59,9 +59,10 @@ module.exports = function (opts) { fileName: file.path, showProperties: false })); + return Promise.reject(error); }).then( () => cb(), - () => cb() + (e) => cb(e) ); }); };