From b75beda99cec0853535656776d169812761f1703 Mon Sep 17 00:00:00 2001 From: drscre Date: Mon, 24 Mar 2014 13:26:04 +0300 Subject: [PATCH] Bug in RunScriptCommand::execute() When checking for known command in commandEvents and scriptEvent '&&' should be used instead of '||' --- src/Composer/Command/RunScriptCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/RunScriptCommand.php b/src/Composer/Command/RunScriptCommand.php index 1f9755347..ecdcff23f 100644 --- a/src/Composer/Command/RunScriptCommand.php +++ b/src/Composer/Command/RunScriptCommand.php @@ -69,7 +69,7 @@ EOT protected function execute(InputInterface $input, OutputInterface $output) { $script = $input->getArgument('script'); - if (!in_array($script, $this->commandEvents) || !in_array($script, $this->scriptEvents)) { + if (!in_array($script, $this->commandEvents) && !in_array($script, $this->scriptEvents)) { if (defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) { throw new \InvalidArgumentException(sprintf('Script "%s" cannot be run with this command', $script)); }