<commit_before><?php

namespace cbednarski\Pharcc\Command;

use cbednarski\Pharcc\Config;
use cbednarski\Pharcc\Compiler;

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

class Build extends Command
{
    protected function configure()
    {
        $this->setName('build');
        $this->setDescription('Build a phar from a pharcc.yml file in the specified directory');
        $this->addArgument(
            'directory',
            InputArgument::OPTIONAL,
            'pharcc folder (defaults to the current directory if not specified)'
        );
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $directory = $input->getArgument('directory');

        if (!$directory) {
            $directory = getcwd();
        }

        $config = Config::loadFile($directory . '/pharcc.yml');
        $compiler = new Compiler($config);
        $compiler->setOutput($output);

        $output->writeln('<info>Building ' . $config->getTarget() . '</info>');
        $compiler->build();
        $output->writeln('<info>Build complete.</info>');
    }
}
<commit_msg>Updated the Build command to look for the config in .pharcc.yml<commit_after><?php

namespace cbednarski\Pharcc\Command;

use cbednarski\Pharcc\Config;
use cbednarski\Pharcc\Compiler;

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

class Build extends Command
{
    protected function configure()
    {
        $this->setName('build');
        $this->setDescription('Build a phar from a pharcc.yml file in the specified directory');
        $this->addArgument(
            'directory',
            InputArgument::OPTIONAL,
            'pharcc folder (defaults to the current directory if not specified)'
        );
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $directory = $input->getArgument('directory');

        if (!$directory) {
            $directory = getcwd();
        }

        $config = Config::loadFile($directory . '/.pharcc.yml');
        $compiler = new Compiler($config);
        $compiler->setOutput($output);

        $output->writeln('<info>Building ' . $config->getTarget() . '</info>');
        $compiler->build();
        $output->writeln('<info>Build complete.</info>');
    }
}

{'fraction_non_alphanumeric': 0.13211933359163114, 'fraction_numerical': 0.0, 'mean_word_length': 3.034375, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 29, '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': '6425296', 'n_tokens_mistral': 730, 'n_tokens_neox': 720, 'n_words': 154}