File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export default class TaskRunner {
101101 this . _currentActiveTasks = 0 ;
102102 console . log ( `Executing a maximum of ${ this . _parallelism } simultaneous processes...${ os . EOL } ` ) ;
103103
104- this . _checkForCyclicDependencies ( [ ... this . _tasks . values ( ) ] , [ ] ) ;
104+ this . _checkForCyclicDependencies ( this . _tasks . values ( ) , [ ] ) ;
105105
106106 // Precalculate the number of dependent packages
107107 this . _tasks . forEach ( ( task : ITask ) => {
@@ -284,15 +284,15 @@ export default class TaskRunner {
284284 /**
285285 * Checks for projects that indirectly depend on themselves.
286286 */
287- private _checkForCyclicDependencies ( tasks : ReadonlyArray < ITask > , dependencyChain : string [ ] ) : void {
287+ private _checkForCyclicDependencies ( tasks : Iterable < ITask > , dependencyChain : string [ ] ) : void {
288288 for ( const task of tasks ) {
289289 if ( dependencyChain . indexOf ( task . name ) >= 0 ) {
290290 throw new Error ( 'A cyclic dependency was encountered:' + os . EOL
291291 + ' ' + [ ...dependencyChain , task . name ] . reverse ( ) . join ( '\n -> ' ) + os . EOL
292292 + 'Consider using the cyclicDependencyProjects option for rush.json.' ) ;
293293 }
294294 dependencyChain . push ( task . name ) ;
295- this . _checkForCyclicDependencies ( [ ... task . dependents ] , dependencyChain ) ;
295+ this . _checkForCyclicDependencies ( task . dependents , dependencyChain ) ;
296296 dependencyChain . pop ( ) ;
297297 }
298298 }
You can’t perform that action at this time.
0 commit comments