Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a11f3e

Browse filesBrowse files
committed
[FrameworkBundle] Add project directory default for installing assets
1 parent 635d77b commit 7a11f3e
Copy full SHA for 7a11f3e

File tree

1 file changed

+7
-1
lines changed
Filter options

1 file changed

+7
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
8282
$targetArg = rtrim($input->getArgument('target'), '/');
8383

8484
if (!is_dir($targetArg)) {
85-
throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
85+
$appRoot = $this->getContainer()->getParameter('kernel.root_dir').'/..';
86+
87+
$targetArg = $appRoot.'/'.$targetArg;
88+
89+
if (!is_dir($targetArg)) {
90+
throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
91+
}
8692
}
8793

8894
$this->filesystem = $this->getContainer()->get('filesystem');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.