import { Command } from '@oclif/core';
import { fork as foreman, isForemanExitError } from '../../lib/local/fork-foreman.js';
export default class Version extends Command {
    static description = 'display node-foreman version';
    async run() {
        await this.parse(Version);
        const execArgv = ['--version'];
        try {
            await foreman(execArgv);
        }
        catch (error) {
            if (isForemanExitError(error)) {
                this.exit(error.exitCode);
            }
            throw error;
        }
    }
}
