diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 2c1cb3079..b4deda07a 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -153,11 +153,11 @@ class GitDownloader extends VcsDownloader protected function reapplyChanges($path) { if ($this->hasStashedChanges) { + $this->hasStashedChanges = false; $this->io->write(' Re-applying stashed changes'); if (0 !== $this->process->execute('git stash pop', $output, $path)) { throw new \RuntimeException("Failed to apply stashed changes:\n\n".$this->process->getErrorOutput()); } - $this->hasStashedChanges = false; } }