mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Allow custom script descriptions.
This commit is contained in:
parent
90b802a732
commit
bf880ad5e0
3 changed files with 22 additions and 3 deletions
|
@ -23,10 +23,12 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
class ScriptAliasCommand extends BaseCommand
|
||||
{
|
||||
private $script;
|
||||
private $description;
|
||||
|
||||
public function __construct($script)
|
||||
public function __construct($script, $description)
|
||||
{
|
||||
$this->script = $script;
|
||||
$this->description = empty($description) ? 'Runs the '.$script.' script as defined in composer.json.' : $description;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
@ -35,7 +37,7 @@ class ScriptAliasCommand extends BaseCommand
|
|||
{
|
||||
$this
|
||||
->setName($this->script)
|
||||
->setDescription('Runs the '.$this->script.' script as defined in composer.json.')
|
||||
->setDescription($this->description)
|
||||
->setDefinition(array(
|
||||
new InputOption('dev', null, InputOption::VALUE_NONE, 'Sets the dev mode.'),
|
||||
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables the dev mode.'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue