diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Installer/BinaryInstaller.php
index 1f6f14d78..7d5db0d2b 100644
--- a/src/Composer/Installer/BinaryInstaller.php
+++ b/src/Composer/Installer/BinaryInstaller.php
@@ -77,6 +77,10 @@ class BinaryInstaller
$this->io->writeError(' Skipped installation of bin '.$bin.' for package '.$package->getName().': file not found in package');
continue;
}
+ if (is_dir($binPath)) {
+ $this->io->writeError(' Skipped installation of bin '.$bin.' for package '.$package->getName().': found a directory at that path');
+ continue;
+ }
if (!$this->filesystem->isAbsolutePath($binPath)) {
// in case a custom installer returned a relative path for the
// $package, we can now safely turn it into a absolute path (as we