From 040bbaca51b2468224c37f4626161c7cedc57793 Mon Sep 17 00:00:00 2001 From: Max Gfeller Date: Thu, 19 Dec 2013 07:54:16 +0100 Subject: [PATCH] Don't throw an exception if the called script is not one of the event-scripts. This makes it possible for one to define their own scripts like "make-release" etc. --- src/Composer/Command/RunScriptCommand.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Composer/Command/RunScriptCommand.php b/src/Composer/Command/RunScriptCommand.php index c4a3a3563..4317ba08c 100644 --- a/src/Composer/Command/RunScriptCommand.php +++ b/src/Composer/Command/RunScriptCommand.php @@ -56,8 +56,6 @@ EOT if (defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) { throw new \InvalidArgumentException(sprintf('Script "%s" cannot be run with this command', $script)); } - - throw new \InvalidArgumentException(sprintf('Script "%s" does not exist', $script)); } $this->getComposer()->getEventDispatcher()->dispatchCommandEvent($script, $input->getOption('dev') || !$input->getOption('no-dev'));