'use strict';
import { exec, execSync } from 'child_process';
import { promisify } from 'util';
import { stdioStatuses } from '../../../base-repo/constants/tools-constants.js';
import { cliLogCommand } from '../../../fd-toolbox/logging/cli-logger.js';

var __defProp=Object['defineProperty'],__name=(_0x57b8db,_0x1e6a1d)=>__defProp(_0x57b8db,'name',{'value':_0x1e6a1d,'configurable':!![]});const execAsync=promisify(exec);function execSyncCommand(_0x1f9bc1,_0x270670={}){cliLogCommand(_0x1f9bc1),execSync(_0x1f9bc1,{'stdio':stdioStatuses['inherit'],..._0x270670});}__name(execSyncCommand,'execSyncCommand');function execCommand(_0x36956c,_0x4bce0a){cliLogCommand(_0x36956c);const _0x38356a=_0x4bce0a??{};return execAsync(_0x36956c,{'stdio':stdioStatuses['inherit'],..._0x38356a});}__name(execCommand,'execCommand');function execOutput(_0x26d0fd,_0x4d2005={}){return cliLogCommand(_0x26d0fd),execSync(_0x26d0fd,{'stdio':stdioStatuses['pipe'],..._0x4d2005})['toString']()['trim']();}__name(execOutput,'execOutput');function pathExists(_0x3554d9){try{return execSync('test\x20-e\x20'+_0x3554d9,{'stdio':stdioStatuses['ignore']}),!![];}catch{return ![];}}__name(pathExists,'pathExists');

export { execCommand, execOutput, execSyncCommand, pathExists };
