1
0
Fork 0

Fix require command to allow working on network mounts, fixes #8231

pull/8390/head
Jordi Boggiano 2019-10-25 14:08:30 +02:00
parent e85ade3107
commit 4fc6479837
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,9 @@ EOT
return 1;
}
if (!is_readable($this->file)) {
// check for readability by reading the file as is_readable can not be trusted on network-mounts
// see https://github.com/composer/composer/issues/8231 and https://bugs.php.net/bug.php?id=68926
if (!is_readable($this->file) && false === Silencer::call('file_get_contents', $this->file)) {
$io->writeError('<error>'.$this->file.' is not readable.</error>');
return 1;