From 82d939d7f78c7920511b4336276fb5501557e678 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Tue, 29 Oct 2019 15:06:07 +0100 Subject: [PATCH] Validate composer show with --tree and --path options set (#8390) --- src/Composer/Command/ShowCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 4152dc9d6..441fe6818 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -129,6 +129,12 @@ EOT return 1; } + if ($input->getOption('tree') && $input->getOption('path')) { + $io->writeError('The --tree (-t) option is not usable in combination with --path (-P)'); + + return 1; + } + $format = $input->getOption('format'); if (!in_array($format, array('text', 'json'))) { $io->writeError(sprintf('Unsupported format "%s". See help for supported formats.', $format));