From 9cad03f89b040a25a71d0b95035db0e5cb029aa7 Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Sun, 5 May 2024 21:20:53 +0200 Subject: [PATCH] Update: Respects non-interactive mode from composer # Need https://github.com/neos/flow-development-collection/pull/3348 --- Classes/Composer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Classes/Composer.php b/Classes/Composer.php index c842793..9fa0440 100644 --- a/Classes/Composer.php +++ b/Classes/Composer.php @@ -5,17 +5,23 @@ use Neos\Flow\Cli\ConsoleOutput; use Neos\Utility\Exception\FilesException; use Neos\Utility\Files; +use Composer\Installer\PackageEvent; class Composer { /** * Copy files to project root * + * @param PackageEvent|null $event * @return void * @throws FilesException */ - public static function postPackageUpdateAndInstall(): void + public static function postPackageUpdateAndInstall(?PackageEvent $event = null): void { + if (isset($event) && $event->getIO()->isInteractive() == false) { + return; + } + $console = new ConsoleOutput(); $console->outputLine(''); $install = $console->askConfirmation(' Do you want to copy the needed files for Carbon.Pipeline to your project root? (y/n) ', true);