diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index 9f36c8d714..feb966d850 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -82,7 +82,13 @@ EOT $targetArg = rtrim($input->getArgument('target'), '/'); if (!is_dir($targetArg)) { - throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target'))); + $appRoot = $this->getContainer()->getParameter('kernel.root_dir').'/..'; + + $targetArg = $appRoot.'/'.$targetArg; + + if (!is_dir($targetArg)) { + throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target'))); + } } $this->filesystem = $this->getContainer()->get('filesystem');