mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Also output root plugin warning after script execution errors
This commit is contained in:
parent
9acf6bc0a1
commit
be876b47a9
1 changed files with 5 additions and 0 deletions
|
@ -394,6 +394,11 @@ class Application extends BaseApplication
|
|||
|
||||
return $result;
|
||||
} catch (ScriptExecutionException $e) {
|
||||
if ($this->getDisablePluginsByDefault() && $this->isRunningAsRoot() && !$this->io->isInteractive()) {
|
||||
$io->writeError('<error>Plugins have been disabled automatically as you are running as root, this may be the cause of the script failure.</error>', true, IOInterface::QUIET);
|
||||
$io->writeError('<error>See also https://getcomposer.org/root</error>', true, IOInterface::QUIET);
|
||||
}
|
||||
|
||||
return $e->getCode();
|
||||
} catch (\Throwable $e) {
|
||||
$ghe = new GithubActionError($this->io);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue