Skip to content

Commit 5e5c982

Browse files
NerdyProjectsnicolas-grekas
authored andcommitted
[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.
1 parent 45a69c2 commit 5e5c982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
121121
if (is_dir(\dirname($targetArg).'/web')) {
122122
$targetArg = \dirname($targetArg).'/web';
123123
} else {
124-
throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
124+
throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $targetArg));
125125
}
126126
}
127127
}

0 commit comments

Comments
 (0)