UpdateDatabase.php
authorAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 06:15:49 +0000 (14:15 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 06:15:49 +0000 (14:15 +0800)
UpdateDatabase.php

index 923ab8a..ecb94d9 100644 (file)
@@ -474,6 +474,17 @@ class Pman_Core_UpdateDatabase extends Pman
     
     function checkOpts($opts)
     {
+        
+        
+        foreach($opts as $o=>$v) {
+            if (!preg_match('/^json-/', $o) || empty($v)) {
+                continue;
+            }
+            if (!file_exists($v)) {
+                die("File does not exist : OPTION --{$o} = {$v} \n");
+            }
+        }
+        
         $modules = array_reverse($this->modulesList());
         
         // move 'project' one to the end...