So I have a console script i want run after composer has run an install.
"scripts": { "post-install-cmd": [ "php vendor/bin/setup.php" ] } my setup.php is a CLI script that now looks like
<?php echo "something: "; $foo = trim(fgets(STDIN)); echo "you said " . $foo; ?> When I run php vendor/bin/setup.php manually form the command line - no problems. As expected. However when I run composer install the file executes but STDIN does not wait for a response.
Related questions 12 How to fix error of composer post-install-cmd script? 0 Installing composer dependencies from a script 0 Composer skips prompt in scripts Related questions 12 How to fix error of composer post-install-cmd script? 0 Installing composer dependencies from a script 0 Composer skips prompt in scripts 1 Composer post-install-cmd not running with git hook 1 Composer install hangs at ScriptHandler::buildBootstrap 0 Composer auto-load fails inside post-install script 18 Composer unable to run post install script 3 Interactive PHP script with composer 1 How can I run composer post-install command in background? 2 "composer install" invokes post-update-cmd instead of post-install-cmd Load 7 more related questions Show fewer related questions
Reset to default