"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asyncExec = void 0;
const child_process_1 = require("child_process");
const asyncExec = (command) => {
    return new Promise((resolve, reject) => {
        (0, child_process_1.exec)(command, { maxBuffer: 2048 * 2048 }, (error, stdout, stderr) => {
            if (error) {
                console.error({ error });
                reject({ error, message: 'Something went wrong' });
            }
            resolve(stdout || stderr);
        });
    });
};
exports.asyncExec = asyncExec;
