Skip to content

Commit 45ec028

Browse files
committed
bug #579 Check if autoload.php exists before trying to update it (nicolas-grekas)
This PR was merged into the 1.5-dev branch. Discussion ---------- Check if autoload.php exists before trying to update it Close #578 Commits ------- cde1535 Check if autoload.php exists before trying to update it
2 parents 91db60a + cde1535 commit 45ec028

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Flex.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,10 @@ private function updateAutoloadFile()
674674

675675
$autoloadFile = $this->config->get('vendor-dir').'/autoload.php';
676676

677+
if (!file_exists($autoloadFile)) {
678+
return;
679+
}
680+
677681
$code = file_get_contents($autoloadFile);
678682
$code = substr($code, \strlen("<?php\n"));
679683

0 commit comments

Comments
 (0)