summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-09-06 12:53:50 +0300
committerWolfy-J <[email protected]>2019-09-06 12:53:50 +0300
commit2ac01468ee745ace3a72742aa97cbd3e51d6dae2 (patch)
tree0e53fd11338d4882b3409b307a1b671a9f6c7f7e /bin
parent832295948b275898ec398341bba76ed96cbde5d9 (diff)
- minor CS in rr script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rr11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/rr b/bin/rr
index 2f630d6a..e3e2c1d0 100755
--- a/bin/rr
+++ b/bin/rr
@@ -198,11 +198,16 @@ class RRHelper
if (is_file($finalFile)) {
$version = RRHelper::getVersion();
- $previousVersion =
- preg_match('#Version:.+(\d+\.\d+\.\d+)#', (string)shell_exec($finalFile), $mathes) ?
- $mathes[1] : "";
+
+ $previousVersion = preg_match(
+ '#Version:.+(\d+\.\d+\.\d+)#',
+ (string)shell_exec($finalFile),
+ $matches
+ ) ? $matches[1] : "";
+
$output->writeln('<error>RoadRunner binary file already exists!</error>');
$helper = $this->getHelper('question');
+
if (version_compare($previousVersion, $version) === 0) {
$output->writeln(sprintf('<info>Current version: %s</info>', $previousVersion));
$question = new ConfirmationQuestion(