Skip to content

Commit

Permalink
fix console input
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Mar 1, 2024
1 parent ea649f2 commit 844528c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/ci/files/bin/console
Expand Up @@ -13,6 +13,8 @@
* @license http://www.pimcore.org/license GPLv3 and PEL
*/

use Symfony\Component\Console\Input\InputInterface;

ob_get_clean();

if (file_exists($a = getcwd() . '/vendor/autoload_runtime.php')) {
Expand All @@ -26,10 +28,9 @@ if (file_exists($a = getcwd() . '/vendor/autoload_runtime.php')) {
exit(1);
}

return function (array $context) {
return function (InputInterface $input) {
define('PIMCORE_CONSOLE', true);

$input = new \Symfony\Component\Console\Input\ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}
Expand Down

0 comments on commit 844528c

Please sign in to comment.