How to use the execa.then function in execa

To help you get started, we’ve selected a few execa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infinitered / gluegun / src / toolbox / system-tools.ts View on Github external
return new Promise((resolve, reject) => {
    const args = commandLine.split(' ')
    require('execa')(head(args), tail(args), options)
      .then(result => resolve(result.stdout))
      .catch(error => reject(error))
  })
}