From d465df434c6cd96100f242b8223384fb0f6a595c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 18 Aug 2021 10:16:20 +0200 Subject: [PATCH] Make sure diagnose command can run without proc_open, refs #9253 --- src/Composer/Command/DiagnoseCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php index 415b6d7b23c5..e70815fc6915 100644 --- a/src/Composer/Command/DiagnoseCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -189,6 +189,7 @@ protected function execute(InputInterface $input, OutputInterface $output) 'zip: ' . (extension_loaded('zip') ? 'extension present' : 'extension not loaded') . ', ' . ($hasSystemUnzip ? 'unzip present' : 'unzip not available') . ', ' . ($hasSystem7zip ? '7-Zip present ('.$bin7zip.')' : '7-Zip not available') + . (($hasSystem7zip || $hasSystemUnzip) && !function_exists('proc_open') ? ', proc_open is disabled or not present, unzip/7-z will not be usable' : '') ); return $this->exitCode; @@ -220,6 +221,10 @@ private function checkComposerSchema() private function checkGit() { + if (!function_exists('proc_open')) { + return 'proc_open is not available, git cannot be used'; + } + $this->process->execute('git config color.ui', $output); if (strtolower(trim($output)) === 'always') { return 'Your git color.ui setting is set to always, this is known to create issues. Use "git config --global color.ui true" to set it correctly.';