Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
[BUGFIX] Do not fail hard when directories cannot be created
Browse files Browse the repository at this point in the history
Fixes: #9
  • Loading branch information
helhum committed Dec 16, 2018
1 parent 480983b commit c3530fd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Composer/InstallerScript/WebDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,15 @@ private function getCoreLinks(): array
foreach ($coreLinks as $link) {
$source = $rootDir . '/' . $link;
$target = $webDir . '/' . $link;
$this->filesystem->ensureDirectoryExists($source);
$links[] = [
'source' => $source,
'target' => $target,
];
try {
$this->filesystem->ensureDirectoryExists($source);
$links[] = [
'source' => $source,
'target' => $target,
];
} catch (\Throwable $e) {
$this->io->writeError(sprintf('<warning>Could not create directory "%s". Symlink in document root will not be created.</warning>', $link));
}
}

return $links;
Expand Down

0 comments on commit c3530fd

Please sign in to comment.