Open Bilge opened 1 year ago
Git is run in a Bourne Shell (sh
) like this:
exec('sh -c "git --version" > /dev/null 2>&1', $_out, $exit);
If your mingw64 doesn't have sh
in the path that'll be a problem. You can test with the following,
<?php
exec('sh -c "git --version" 2>&1', $out, $exit);
var_dump($out);
var_dump($exit);
Good output looks like this:
array(1) {
[0]=>
string(18) "git version 2.37.3"
}
int(0)
$ php test.php
C:\test.php:3:
array(1) {
[0] =>
string(28) "git version 2.38.0.windows.1"
}
C:\test.php:4:
int(0)
also ran over this problem with the latest version
composer-lock-diff
which git
git --version