<commit_before><?php

namespace MaxBucknell\Gulp\Console\Command;


use MaxBucknell\Gulp\Model\Filesystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class Install extends Command
{
    /**
     * @var Filesystem
     */
    private $filesystem;

    public function __construct(
        Filesystem $filesystem,
        $name = null
    ) {
        parent::__construct($name);

        $this->filesystem = $filesystem;
    }


    protected function configure()
    {
        $this->setName('setup:gulp:install');
        $this->setDescription('Install all NPM dependencies');
        $this->addOption(
            'npm',
            null,
            InputOption::VALUE_NONE,
            'Whether to use npm instead of yarn'
        );
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {

        $executable = $input->getOption('npm') ? 'npm' : 'yarn';
        $directory = $this->filesystem->getAbsoluteLocation();

        chdir($directory);
        passthru("$executable install");
    }
}<commit_msg>Remove lock file before installing<commit_after><?php

namespace MaxBucknell\Gulp\Console\Command;


use MaxBucknell\Gulp\Model\Filesystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class Install extends Command
{
    /**
     * @var Filesystem
     */
    private $filesystem;

    public function __construct(
        Filesystem $filesystem,
        $name = null
    ) {
        parent::__construct($name);

        $this->filesystem = $filesystem;
    }


    protected function configure()
    {
        $this->setName('setup:gulp:install');
        $this->setDescription('Install all NPM dependencies');
        $this->addOption(
            'npm',
            null,
            InputOption::VALUE_NONE,
            'Whether to use npm instead of yarn'
        );
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {

        $executable = $input->getOption('npm') ? 'npm' : 'yarn';
        $directory = $this->filesystem->getAbsoluteLocation();

        chdir($directory);
        passthru("rm -rf package-lock.json");
        passthru("$executable install");
    }
}
{'fraction_non_alphanumeric': 0.11940298507462686, 'fraction_numerical': 0.0, 'mean_word_length': 2.7293233082706765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3928736', 'n_tokens_mistral': 718, 'n_tokens_neox': 685, 'n_words': 137}