diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index 71f45e8e4..d05b8e63f 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -90,7 +90,19 @@ class LibraryInstaller implements InstallerInterface, BinaryPresenceInterface return true; } - return (Platform::isWindows() && $this->filesystem->isJunction($installPath)) || is_link($installPath); + if (Platform::isWindows() && $this->filesystem->isJunction($installPath)) { + return true; + } + + if (is_link($installPath)) { + if (realpath($installPath) === false) { + return false; + } + + return true; + } + + return false; } /**