1
0
Fork 0

Fixed detection of hg version when localized, fixes #9753

pull/9803/head
Jordi Boggiano 2021-04-01 10:09:49 +02:00
parent 7b8a15d648
commit dc84dbbbf7
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@
* Fixed issue extracting archives into paths that already exist, fixing problems with some custom installers (composer/installers#479) * Fixed issue extracting archives into paths that already exist, fixing problems with some custom installers (composer/installers#479)
* Fixed support for branch names starting with master/trunk/default (#9739) * Fixed support for branch names starting with master/trunk/default (#9739)
* Fixed self-update to preserve phar file permissions on Windows (#9733) * Fixed self-update to preserve phar file permissions on Windows (#9733)
* Fixed detection of hg version when localized (#9753)
* Fixed git execution failures to also include the stdout output (#9720) * Fixed git execution failures to also include the stdout output (#9720)
### [2.0.11] 2021-02-24 ### [2.0.11] 2021-02-24

View File

@ -92,7 +92,7 @@ class Hg
{ {
if (false === self::$version) { if (false === self::$version) {
self::$version = null; self::$version = null;
if (0 === $process->execute('hg --version', $output) && preg_match('/version (\d+(?:\.\d+)+)/m', $output, $matches)) { if (0 === $process->execute('hg --version', $output) && preg_match('/^.+? (\d+(?:\.\d+)+)\)?\r?\n/', $output, $matches)) {
self::$version = $matches[1]; self::$version = $matches[1];
} }
} }