packages/ant-util-yargs/lib/yargsHelper.js
async function executeCommand(command, asyncFn) {
  try {
    await asyncFn();
    process.exit(0);
  } catch (e) {
    handleErrorMessage(e.message, e, command);
  }
}
async function executeCommand(command, asyncFn) {
  try {
    await asyncFn();
    process.exit(0);
  } catch (e) {
    handleErrorMessage(e.message, e, command);
  }
}
async function executeCommand ( command , asyncFn ) { try { await asyncFn ( ) ; process . exit ( 0 ) ; } catch ( e ) { handleErrorMessage ( e . message , e , command ) ; } }
Helper function encapsulates an asynchronous function to be executed
and handled on any errors thrown, providing a friendly error message
based on the command that this function represents.
In case of success, the process is exit with code 0.
In case of failure, the process is exit with code 1.

@param {!String} command The command about to be executed
@param {!Function} asyncFn The asynchronous function to be executed
Helper function encapsulates an asynchronous function to be executed and handled on any errors thrown providing a friendly error message based on the command that this function represents . In case of success the process is exit with code 0 . In case of failure the process is exit with code 1 .