8000 [FrameworkBundle] Add project directory default for installing assets by noahheck · Pull Request #20642 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Add project directory default for installing assets #20642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle] Add project directory default for installing assets
  • Loading branch information
noahheck committed Dec 9, 2016
commit 7a11f3ecf3493623a7a6dde9d20f389760ef899e
6AD4
Original file line number Diff line numberDiff line change
Expand Up @@ -82,7 +82,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$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');
Expand Down
0