Skip to content

Commit

Permalink
[FrameworkBundle] Create the bundles directory before trying to symli…
Browse files Browse the repository at this point in the history
…nk else it will throw an error
  • Loading branch information
Henrik Bjørnskov authored and fabpot committed Dec 8, 2010
1 parent 70a793b commit 50cfd4a
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -52,6 +52,9 @@ protected function execute(InputInterface $input, OutputInterface $output)

$filesystem = new Filesystem();

// Create the bundles directory otherwise symlink will fail.
$filesystem->mkdirs($input->getArgument('target').'/bundles/', 0777);

foreach ($this->container->get('kernel')->getBundles() as $bundle) {
if (is_dir($originDir = $bundle->getPath().'/Resources/public')) {
$output->writeln(sprintf('Installing assets for <comment>%s\\%s</comment>', $bundle->getNamespacePrefix(), $bundle->getName()));
Expand All @@ -63,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('symlink')) {
$filesystem->symlink($originDir, $targetDir);
} else {
mkdir($targetDir, 0777, true);
$filesystem->mkdirs($targetDir, 0777);
$filesystem->mirror($originDir, $targetDir);
}
}
Expand Down

0 comments on commit 50cfd4a

Please sign in to comment.