show proper error message on remote forking
[phorkie.git] / src / phorkie / ForkRemote.php
index 78c3caa37fd81740a293509b658fa91802314f5c..7f6129d9a524cefe134e116a2ac6ffd4014b2dbf 100644 (file)
@@ -3,6 +3,11 @@ namespace phorkie;
 
 class ForkRemote
 {
+    /**
+     * Contains error message when parse() failed
+     */
+    public $error;
+
     protected $url;
 
     /**
@@ -90,7 +95,12 @@ class ForkRemote
             }
         }
 
-        return $count > 0;
+        if ($count > 0) {
+            return true;
+        }
+
+        $this->error = 'No git:// clone URL found';
+        return false;
     }
 
     /**