Skip to content

Commit

Permalink
Avoid running cache GC within completion processes
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 13, 2022
1 parent b6fb881 commit 97c7ffa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Composer/Cache.php
Expand Up @@ -248,6 +248,10 @@ public function gcIsNecessary()
return false;
}

if (Platform::isInputCompletionProcess()) {
return false;
}

return !random_int(0, 50);
}

Expand Down

0 comments on commit 97c7ffa

Please sign in to comment.