Explorar el Código

Avoid clearing the error output during removeDirectory execution, losing git error output, fixes #8351

Jordi Boggiano hace 5 años
padre
commit
ae9cc3db58
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/Composer/Util/Git.php

+ 3 - 1
src/Composer/Util/Git.php

@@ -215,10 +215,12 @@ class Git
                 }
             }
 
+            $errorMsg = $this->process->getErrorOutput();
             if ($initialClone) {
                 $this->filesystem->removeDirectory($origCwd);
             }
-            $this->throwException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput(), $url);
+
+            $this->throwException('Failed to execute ' . $command . "\n\n" . $errorMsg, $url);
         }
     }