From ae9cc3db58f80ed2703ad6fd06ffa84405c745ef Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 30 Oct 2019 10:45:40 +0100 Subject: [PATCH] Avoid clearing the error output during removeDirectory execution, losing git error output, fixes #8351 --- src/Composer/Util/Git.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 20457d708..574856dc7 100644 --- a/src/Composer/Util/Git.php +++ b/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); } }