Closed Yuriy-Svetlov closed 3 years ago
Hi @semiromid,
grunt.fatal
is an alias for grunt.fail.fatal
, meaning they are both exactly the same.
@C-Lodder Thank you for your answer!
Still, this is not quite the same.
Since you need to do the hook differently
// Instead of this
grunt.util.hooker.hook(grunt.fail, 'fatal', function(e){
});
// this
grunt.util.hooker.hook(grunt, 'fatal', function(e){
});
I think there should be a unified approach to the implementation of this task.
@semiromid if you open the following file:
node_modules/@lodder/grunt-postcss/tasks/postcss.js
and replace grunt.fatal
with grunt.fail.fatal
, does it solve the issue?
If so, I'm happy to make that change
@C-Lodder
Yes. Thank you!
Perfect, thanks.
I'll make the change and release an update
Hello @C-Lodder
Why are you using?
grunt.fatal(error);
https://gruntjs.com/api/grunt.fail
Need it use:
grunt.fail.fatal(error);
Because of this, I can not catch the error according to the standards of the official documentation