"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
/**
 * penguins-eggs
 * command: mom.ts
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 */
const core_1 = require("@oclif/core");
const node_path_1 = tslib_1.__importDefault(require("node:path"));
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
const utils_2 = require("../lib/utils");
class Mom extends core_1.Command {
    async run() {
        utils_1.default.titles(this.id + ' ' + this.argv);
        // No sudo!
        if (process.getuid && process.getuid() === 0) {
            utils_1.default.warning('You must to be kind with your mom! Call her without sudo');
            process.exit(0);
        }
        const cmd = node_path_1.default.resolve(__dirname, '../../scripts/mom.sh');
        await (0, utils_2.exec)(cmd);
    }
}
Mom.flags = {
    help: core_1.Flags.help({ char: 'h' }),
};
Mom.description = 'ask help from mommy - TUI helper';
Mom.examples = [
    'eggs mom',
];
exports.default = Mom;
