<commit_before><?php

namespace CommerceGuys\Platform\Cli\Command;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class DrushCommand extends PlatformCommand
{

    protected function configure()
    {
        $this
            ->setName('drush')
            ->setDescription('Invoke a drush command using the site alias for the current environment.');
        $this->ignoreValidationErrors();
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureDrushInstalled();

        // Try to autodetect the project and environment.
        // There is no point in allowing the user to override them
        // using --project and --environment, in that case they can run
        // drush by themselves and specify the site alias manually.
        $this->project = $this->getCurrentProject();
        if (!$this->project) {
            $output->writeln("<error>You must run this command from a project folder.</error>");
            return;
        }
        $this->environment = $this->getCurrentEnvironment($this->project);
        if (!$this->environment) {
            $output->writeln("<error>Could not determine the current environment.</error>");
            return;
        }

        $alias = $this->project['id'] . '.' . $this->environment['id'];
        $command = 'drush @' . $alias . ' ';
        // Take the entire input string (all arguments and options) after the
        // name of the drush command.
        $command .= substr($input->__toString(), 6);
        passthru($command);
    }
}<commit_msg>Make the drush command recognize the custom alias name.<commit_after><?php

namespace CommerceGuys\Platform\Cli\Command;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class DrushCommand extends PlatformCommand
{

    protected function configure()
    {
        $this
            ->setName('drush')
            ->setDescription('Invoke a drush command using the site alias for the current environment.');
        $this->ignoreValidationErrors();
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureDrushInstalled();

        // Try to autodetect the project and environment.
        // There is no point in allowing the user to override them
        // using --project and --environment, in that case they can run
        // drush by themselves and specify the site alias manually.
        $this->project = $this->getCurrentProject();
        if (!$this->project) {
            $output->writeln("<error>You must run this command from a project folder.</error>");
            return;
        }
        $this->environment = $this->getCurrentEnvironment($this->project);
        if (!$this->environment) {
            $output->writeln("<error>Could not determine the current environment.</error>");
            return;
        }

        $aliasGroup = isset($this->project['alias-group']) ? $this->project['alias-group'] : $this->project['id'];

        $alias = $aliasGroup . '.' . $this->environment['id'];
        $command = 'drush @' . $alias . ' ';
        // Take the entire input string (all arguments and options) after the
        // name of the drush command.
        $command .= substr($input->__toString(), 6);
        passthru($command);
    }
}
{'fraction_non_alphanumeric': 0.12415614910478427, 'fraction_numerical': 0.000587026709715292, 'mean_word_length': 2.55741127348643, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4305291', 'n_tokens_mistral': 859, 'n_tokens_neox': 855, 'n_words': 260}