From 623f903d628be88b6cf0416471066dc5c64c9945 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 20 Jul 2022 22:47:27 +0200 Subject: [PATCH] Add support for +meta in hg version number, fixes #10955 --- src/Composer/Util/Hg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Hg.php b/src/Composer/Util/Hg.php index 73e3a8e52..00cd886f7 100644 --- a/src/Composer/Util/Hg.php +++ b/src/Composer/Util/Hg.php @@ -107,7 +107,7 @@ class Hg { if (false === self::$version) { self::$version = null; - if (0 === $process->execute('hg --version', $output) && Preg::isMatch('/^.+? (\d+(?:\.\d+)+)\)?\r?\n/', $output, $matches)) { + if (0 === $process->execute('hg --version', $output) && Preg::isMatch('/^.+? (\d+(?:\.\d+)+)(?:\+.*?)?\)?\r?\n/', $output, $matches)) { self::$version = $matches[1]; } }