Skip to content

Commit

Permalink
minor #36726 [FrameworkBundle] display actual target for error in Ass…
Browse files Browse the repository at this point in the history
…etsInstallCommand (NerdyProjects)

This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[FrameworkBundle] display actual target for error in AssetsInstallCommand

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT

When assets:install fails because the target directory does not exist, it should display the actual directory it wanted to have instead of the configuration directive. In most cases, the target directory is retrieved from the kernel config and thus differs from the argument.

Commits
-------

f177b3d [FrameworkBundle] display actual target for error in AssetsInstallCommand
  • Loading branch information
nicolas-grekas committed May 8, 2020
2 parents 9b088bb + f177b3d commit 94482fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (is_dir(\dirname($targetArg).'/web')) {
$targetArg = \dirname($targetArg).'/web';
} else {
throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $targetArg));
}
}
}
Expand Down

0 comments on commit 94482fe

Please sign in to comment.