1
0
Fork 0

Add an error msg to clearly explain that plugins are disabled when running as root non-interactively, fixes #11093

pull/11079/merge
Jordi Boggiano 2022-10-13 16:40:38 +02:00
parent acddc1f5e4
commit bc93f734bc
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 0 deletions

View File

@ -286,6 +286,7 @@ class Application extends BaseApplication
} }
if ($isNonAllowedRoot && !$io->isInteractive()) { if ($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; $this->disablePluginsByDefault = true;
} }