Add an error msg to clearly explain that plugins are disabled when running as root non-interactively, fixes #11093
parent
acddc1f5e4
commit
bc93f734bc
|
@ -286,6 +286,7 @@ class Application extends BaseApplication
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue