support for zend_extension
[pharext/pharext] / src / pharext / ExecCmd.php
index 3ea63d00438f2887c8f69ce9c5ee1e3e008adf3f..84bb70882cd2fcb24351cdd47888679b30bd79be 100644 (file)
@@ -87,6 +87,7 @@ class ExecCmd
        /**
         * Run the command
         * @param array $args
+        * @return \pharext\ExecCmd self
         * @throws \pharext\Exception
         */
        public function run(array $args = null) {
@@ -110,8 +111,10 @@ class ExecCmd
                }
                
                if ($this->status) {
-                       throw new Exception("Command {$this->command} failed ({$this->status})");
+                       throw new Exception("Command {$exec} failed ({$this->status})");
                }
+
+               return $this;
        }
        
        /**