Skip to content

Commit

Permalink
Avoid outputting network errors or others while loading suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 12, 2022
1 parent 3b2745a commit 0089a69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Console/Application.php
Expand Up @@ -466,7 +466,7 @@ public function getComposer(bool $required = true, ?bool $disablePlugins = null,

if (null === $this->composer) {
try {
$this->composer = Factory::create($this->io, null, $disablePlugins, $disableScripts);
$this->composer = Factory::create(Platform::isInputCompletionProcess() ? new NullIO() : $this->io, null, $disablePlugins, $disableScripts);
} catch (\InvalidArgumentException $e) {
if ($required) {
$this->io->writeError($e->getMessage());
Expand Down

0 comments on commit 0089a69

Please sign in to comment.