<commit_before>const R = require('ramda')
const execa = require('execa')
const { TerminalUtils, AppUtils } = require('constellate-dev-utils')

module.exports = async function exec({ passThroughArgs }) {
  if (passThroughArgs == null || passThroughArgs.length === 0) {
    TerminalUtils.error('You must supply a cmd to exec')
  }

  const appConfig = AppUtils.getConfig()

  const preExecHook = R.path(['commands', 'exec', 'pre'], appConfig)
  if (preExecHook) {
    TerminalUtils.info('Running the pre exec hook')
    await preExecHook()
  }

  const [cmd, ...args] = passThroughArgs
  // const fullCmd = passThroughArgs.join(' ')
  TerminalUtils.verbose(`Executing ${cmd} with args: [${args.join(', ')}]`)

  try {
    const result = await execa(cmd, args, {
      cwd: process.cwd(),
      stdio: 'inherit',
      env: process.env,
    })
    console.log(result)
  } catch (err) {
    if (err.stderr) {
      console.log(err.stderr)
    }
    TerminalUtils.verbose(err)
  }

  const postExecHook = R.path(['commands', 'exec', 'post'], appConfig)
  if (postExecHook) {
    TerminalUtils.info('Running the post exec hook')
    await postExecHook()
  }
}<commit_msg>Removes exec command output logging.<commit_after>const R = require('ramda')
const execa = require('execa')
const { TerminalUtils, AppUtils } = require('constellate-dev-utils')

module.exports = async function exec({ passThroughArgs }) {
  if (passThroughArgs == null || passThroughArgs.length === 0) {
    TerminalUtils.error('You must supply a cmd to exec')
  }

  const appConfig = AppUtils.getConfig()

  const preExecHook = R.path(['commands', 'exec', 'pre'], appConfig)
  if (preExecHook) {
    TerminalUtils.info('Running the pre exec hook')
    await preExecHook()
  }

  const [cmd, ...args] = passThroughArgs
  // const fullCmd = passThroughArgs.join(' ')
  TerminalUtils.verbose(`Executing ${cmd} with args: [${args.join(', ')}]`)

  try {
    await execa(cmd, args, {
      cwd: process.cwd(),
      stdio: 'inherit',
      env: process.env,
    })
  } catch (err) {
    if (err.stderr) {
      console.log(err.stderr)
    }
    TerminalUtils.verbose(err)
  }

  const postExecHook = R.path(['commands', 'exec', 'post'], appConfig)
  if (postExecHook) {
    TerminalUtils.info('Running the post exec hook')
    await postExecHook()
  }
}
{'fraction_non_alphanumeric': 0.15341400172860847, 'fraction_numerical': 0.000864304235090752, 'mean_word_length': 3.5841584158415842, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3856744', 'n_tokens_mistral': 769, 'n_tokens_neox': 744, 'n_words': 183}