From 5d541ad18d2963798fc1ae14690c47d679aa449e Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Tue, 3 Sep 2024 20:11:19 -0400 Subject: [PATCH] Remove the binary so we can overwrite it while its open --- src/BinaryInstaller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BinaryInstaller.php b/src/BinaryInstaller.php index 5004cb15..2a88b0fd 100644 --- a/src/BinaryInstaller.php +++ b/src/BinaryInstaller.php @@ -250,6 +250,7 @@ protected function installBinary($binary, $version, $url, $sha, $hashalgo = 'sha $this->io->write(sprintf('%s v%s (%s) already exists in bin-dir, not overwriting.', $binary, $version, $sha)); } else { + $fs->remove($binDestination); $fs->copy($cacheExtractedBinary, $binDestination); // Make executable. if ('windows' !== $this->platform) {