File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -54,16 +54,16 @@ function TaskManager(options?: TaskManagerOptions): TaskManager {
54
54
* @param hook Name of the hook
55
55
*/
56
56
function run ( hook : string ) : Promise < boolean > {
57
- return new Promise ( ( resolve , reject ) => {
58
- const onError = ( error ?: Error ) => reject ( error || false ) ;
59
-
60
- if ( hasTasks ( hook ) ) {
61
- gulp . parallel ( tasks [ hook ] ) ( onError ) ;
62
- return resolve ( true ) ;
63
- }
64
-
57
+ // If not tasks in hook, return false
58
+ if ( ! hasTasks ( hook ) ) {
65
59
logger . warn ( `<${ hook } > hook doesn't exist or has no tasks` ) ;
66
- return resolve ( false ) ;
60
+ return Promise . resolve ( false ) ;
61
+ }
62
+
63
+ return new Promise ( ( resolve , reject ) => {
64
+ gulp . series ( gulp . parallel ( tasks [ hook ] ) , ( ) => resolve ( true ) ) (
65
+ /* istanbul ignore next */ ignore => undefined ,
66
+ ) ;
67
67
} ) ;
68
68
}
69
69
You can’t perform that action at this time.
0 commit comments