Browse Source

cambie el directorio antes de ejecutar el task

Luciano Andrade 7 năm trước cách đây
mục cha
commit
396a64f846
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Services/TaskLoggerService.php

+ 4 - 0
Services/TaskLoggerService.php

@@ -91,8 +91,12 @@ class TaskLoggerService implements ConsumerInterface
      */
     public function runProcess($filename)
     {
+	$predir = getcwd();
+	chdir(dirname($filename));
         $process = new Process($filename);
         $process->run();
+	chdir($predir);
+	
 
         return array(
             'output' => $process->getOutput(),