Skip to content

Commit

Permalink
Do not show error that plugins have been disabled when they are alrea…
Browse files Browse the repository at this point in the history
…dy disabled (#11803)
  • Loading branch information
kubawerlos committed Feb 7, 2024
1 parent 9a65685 commit 7745d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function doRun(InputInterface $input, OutputInterface $output): int
$this->hasPluginCommands = true;
}

if ($isNonAllowedRoot && !$io->isInteractive()) {
if (!$this->disablePluginsByDefault && $isNonAllowedRoot && !$io->isInteractive()) {
$io->writeError('<error>Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.</error>');
$this->disablePluginsByDefault = true;
}
Expand Down

0 comments on commit 7745d56

Please sign in to comment.