mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
fix(security): missing error handler in gulp watch task
The gulp.watch task does not include error handling. If the 'less' task fails during watch mode, the watch process may crash or hang without clear indication, potentially leaving the build in an inconsistent state. Additionally, the callback `cb()` is called immediately after gulp.watch, not waiting for the watch to actually start or handle errors. Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
This commit is contained in:
parent
e4a3f105dc
commit
e3f231ff2a
1 changed files with 3 additions and 3 deletions
|
|
@ -15,8 +15,8 @@ gulp.task('less', function (cb) {
|
|||
|
||||
gulp.task(
|
||||
'default',
|
||||
gulp.series('less', function (cb) {
|
||||
gulp.watch('styles/**/*.less', gulp.series('less'));
|
||||
cb();
|
||||
gulp.series('less', function () {
|
||||
return gulp.watch('styles/**/*.less', gulp.series('less'))
|
||||
.on('error', console.error.bind(console));
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue