report error if binary is a directory (#10463)
file_exists is true also for directory and symlink. but later in generateUnixyProxyCode we call `file_get_contents` on the binary, which fails with `file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory` if the binary is a directory.pull/10477/head
parent
af6013093f
commit
6b8f1409e4
|
@ -77,6 +77,10 @@ class BinaryInstaller
|
|||
$this->io->writeError(' <warning>Skipped installation of bin '.$bin.' for package '.$package->getName().': file not found in package</warning>');
|
||||
continue;
|
||||
}
|
||||
if (is_dir($binPath)) {
|
||||
$this->io->writeError(' <warning>Skipped installation of bin '.$bin.' for package '.$package->getName().': found a directory at that path</warning>');
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue