File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ public function check(array &$errors = null):int {
45
45
*/
46
46
public function build (array &$ errors = null ):array {
47
47
$ updatedTasks = [];
48
- foreach ($ this ->taskList as $ pathMatch => $ task ) {
48
+ foreach ($ this ->taskList as $ task ) {
49
49
if ($ task ->build ($ errors )) {
50
50
$ updatedTasks []= $ task ;
51
51
}
52
52
}
53
53
54
54
return $ updatedTasks ;
55
55
}
56
- }
56
+ }
Original file line number Diff line number Diff line change @@ -57,20 +57,23 @@ public function check(array &$errors = null):void {
57
57
}
58
58
59
59
public function build (array &$ errors = null ):bool {
60
- $ changes = false ;
60
+ $ hashMiss = false ;
61
61
62
62
foreach (Glob::glob ($ this ->absolutePath ) as $ matchedPath ) {
63
63
$ hash = filemtime ($ matchedPath );
64
64
$ existingHash = $ this ->fileHashList [$ matchedPath ] ?? null ;
65
65
66
66
if ($ hash !== $ existingHash ) {
67
- $ changes = $ this -> execute ( $ errors ) ;
67
+ $ hashMiss = true ;
68
68
}
69
69
70
70
$ this ->fileHashList [$ matchedPath ] = $ hash ;
71
71
}
72
72
73
- return $ changes ;
73
+ if ($ hashMiss ) {
74
+ return $ this ->execute ($ errors );
75
+ }
76
+ return false ;
74
77
}
75
78
76
79
public function requirementFromRequireBlockItem (
@@ -160,4 +163,4 @@ protected function isAbsolutePath(string $path):bool {
160
163
// Windows:
161
164
|| preg_match ('~\A[A-Z]:(?![^/ \\\\])~i ' ,$ path ) > 0 ;
162
165
}
163
- }
166
+ }
You can’t perform that action at this time.
0 commit comments