From bc93f734bc0b417d132d8d0d6a24cd3cd58264aa Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 13 Oct 2022 16:40:38 +0200 Subject: [PATCH] Add an error msg to clearly explain that plugins are disabled when running as root non-interactively, fixes #11093 --- src/Composer/Console/Application.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 2a080067e..635fb04d3 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -286,6 +286,7 @@ class Application extends BaseApplication } if ($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; }