From 7745d56c147f2abcee82a313f00e6b0a71d5ffa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Wed, 7 Feb 2024 09:32:55 +0100 Subject: [PATCH] Do not show error that plugins have been disabled when they are already disabled (#11803) --- src/Composer/Console/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index b747ea021..774370b51 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -292,7 +292,7 @@ class Application extends BaseApplication $this->hasPluginCommands = true; } - if ($isNonAllowedRoot && !$io->isInteractive()) { + if (!$this->disablePluginsByDefault && $isNonAllowedRoot && !$io->isInteractive()) { $io->writeError('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.'); $this->disablePluginsByDefault = true; }