Skip to content

Commit

Permalink
Fixed symfony multi version
Browse files Browse the repository at this point in the history
  • Loading branch information
dejwCake committed Apr 24, 2019
1 parent 0e307a7 commit 90404f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->appendIfNotExist('.gitignore', '.php_cs.cache', PHP_EOL . '.php_cs.cache');
$this->appendIfNotExist('.gitignore', 'cghooks.lock', PHP_EOL . 'cghooks.lock');

$process = Process::fromShellCommandline(implode(' && ', $commands), null, null, null, null);
if (method_exists(Process::class, 'fromShellCommandline')) {
$process = Process::fromShellCommandline(implode(' && ', $commands), null, null, null, null);
} else {
$process = new Process(implode(' && ', $commands), null, null, null, null);
}

if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) {
$process->setTty(true);
Expand Down

0 comments on commit 90404f0

Please sign in to comment.