Skip to content

Commit

Permalink
Update: Respects non-interactive mode from composer
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed May 7, 2024
1 parent 7c53655 commit b47c3b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('<question> Do you want to copy the needed files for Carbon.Pipeline to your project root? </question> [<options=bold>Y</>/n] ', true);
Expand Down

0 comments on commit b47c3b4

Please sign in to comment.