<commit_before>import { Command, ICommandArgs } from "../command";
import { Shell } from "../shell";

/**
 * Arguments for an Exec command.
 */
export interface IExecArgs extends ICommandArgs {
    /**
     * Command to execute.
     */
    exec: string;

    /**
     * Name of the repository.
     */
    repository: string;
}

/**
 * Executes a command in a repository.
 */
export class Exec extends Command<IExecArgs, void> {
    /**
     * Executes the command.
     * 
     * @returns A Promise for running the command.
     */
    public async execute(): Promise<any> {
        this.ensureArgsExist("exec", "repository");

        await new Shell(this.logger)
            .setCwd(this.args.directory)
            .execute(this.args.exec);
    }
}<commit_msg>Added missing repository part to exec path<commit_after>import { Command, ICommandArgs } from "../command";
import { Shell } from "../shell";

/**
 * Arguments for an Exec command.
 */
export interface IExecArgs extends ICommandArgs {
    /**
     * Command to execute.
     */
    exec: string;

    /**
     * Name of the repository.
     */
    repository: string;
}

/**
 * Executes a command in a repository.
 */
export class Exec extends Command<IExecArgs, void> {
    /**
     * Executes the command.
     * 
     * @returns A Promise for running the command.
     */
    public async execute(): Promise<any> {
        this.ensureArgsExist("exec", "repository");

        await new Shell(this.logger)
            .setCwd(this.args.directory, this.args.repository)
            .execute(this.args.exec);
    }
}
{'fraction_non_alphanumeric': 0.1283997469955724, 'fraction_numerical': 0.0, 'mean_word_length': 2.2821576763485476, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '769596', 'n_tokens_mistral': 457, 'n_tokens_neox': 447, 'n_words': 133}