Skip to content

Errors in CleanCSS cause abort with no diagnostics. #85

@paulmer

Description

@paulmer

An error processing a CSS file (for example, an @import of a non-existing file) causes gulp-clean-css to abort without any diagnostic message.

According to https://gulpjs.com/docs/en/getting-started/async-completion under "Using an error-first callback", the cb function can be passed an Error object, but gulp-clean-css is passing a string on line 37: return cb(errors.join(' '));. Wrapping the string in an error object fixes the problem: return cb(new Error(errors.join(' ')));.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions