From 45af4e3e20b8870e74ea60b72cffb3736bb0bfb9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 1 Nov 2022 16:21:30 +0100 Subject: [PATCH] Do not prompt for binary/script args if they are provided, fixes #11167 --- src/Composer/Command/ExecCommand.php | 4 ++++ src/Composer/Command/RunScriptCommand.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Composer/Command/ExecCommand.php b/src/Composer/Command/ExecCommand.php index 905b28b99..fc774d9e0 100644 --- a/src/Composer/Command/ExecCommand.php +++ b/src/Composer/Command/ExecCommand.php @@ -58,6 +58,10 @@ EOT return; } + if ($input->getArgument('binary') !== null) { + return; + } + $io = $this->getIO(); /** @var string $binary */ $binary = $io->select( diff --git a/src/Composer/Command/RunScriptCommand.php b/src/Composer/Command/RunScriptCommand.php index 20c419500..950ffcc5d 100644 --- a/src/Composer/Command/RunScriptCommand.php +++ b/src/Composer/Command/RunScriptCommand.php @@ -79,6 +79,10 @@ EOT return; } + if ($input->getArgument('script') !== null) { + return; + } + $options = []; foreach ($scripts as $script) { $options[$script['name']] = $script['description'];