Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/dist/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ commands:
- uslca
user:login:url:
- usli
- uli
user:password:hash:
- usph
user:password:reset:
- upsr
views:disable:
- vdi

cache:rebuild:
- cc
update:execute:
- updb
19 changes: 18 additions & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function doRun(InputInterface $input, OutputInterface $output)


if ($commandName && !$this->has($commandName)) {
$isValidCommand = false;
$config = $configurationManager->getConfiguration();
$mappings = $config
->get('application.commands.mappings');
Expand All @@ -129,7 +130,23 @@ public function doRun(InputInterface $input, OutputInterface $output)
$this->add(
$this->find($commandNameMap)->setAliases([$commandName])
);
} else {
$isValidCommand = true;
}

$drushCommand = $configurationManager->readDrushEquivalents($commandName);
if ($drushCommand) {
$this->add(
$this->find($drushCommand)->setAliases([$commandName])
);
$isValidCommand = true;
$messages['warning'][] = sprintf(
$this->trans('application.errors.drush-command'),
$commandName,
$drushCommand
);
}

if (!$isValidCommand) {
$io->error(
sprintf(
$this->trans('application.errors.invalid-command'),
Expand Down