diff --git a/src/Config.php b/src/Config.php
index f027e1a7609937eeb55ddbe1cb0d0c646220e731..8693814ff06b3b394fdf3c066edf25d181e90958 100644
--- a/src/Config.php
+++ b/src/Config.php
@@ -150,7 +150,10 @@ final class Config extends PhpCsFixerConfig
             'years',
             function () {
                 $last = date('Y');
-                $first = exec('git log --format=%cd --date=format:%Y --date-order | tail -n1') ?? $last;
+                $first = exec('git log --format=%cd --date=format:%Y --date-order | tail -n1');
+                if (!$first) {
+                    $first = '???';
+                }
 
                 return ($last !== null && $last !== $first) ? "$first-$last" : $first;
             }