From f177b3d4885ab000e9ed4b2bab758ee45abcbfd2 Mon Sep 17 00:00:00 2001 From: Matthias Larisch Date: Wed, 6 May 2020 14:08:15 +0200 Subject: [PATCH] [FrameworkBundle] display actual target for error in AssetsInstallCommand 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. --- .../Bundle/FrameworkBundle/Command/AssetsInstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index aee869f8fd..199e1ad0da 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -121,7 +121,7 @@ EOT 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)); } } }