How to use the @ionic/utils-process.processExit function in @ionic/utils-process

To help you get started, we’ve selected a few @ionic/utils-process 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 ionic-team / ionic-cli / packages / ionic / src / lib / native-run.ts View on Github external
try {
    await shell.run('native-run', args, { showCommand: !args.includes('--json'), fatalOnNotFound: false, stream, ...options });
  } catch (e) {
    if (e instanceof SubprocessError && e.code === ERROR_COMMAND_NOT_FOUND) {
      throw createNativeRunNotFoundError(config.get('npmClient'));
    }

    throw e;
  }

  // If we connect the `native-run` process to the running app, then we
  // should also connect the Ionic CLI with the running `native-run` process.
  // This will exit the Ionic CLI when `native-run` exits.
  if (connect) {
    processExit(0); // tslint:disable-line:no-floating-promises
  }
}
github ionic-team / ionic-cli / packages / ionic / src / index.ts View on Github external
} else if (err.code && err.code === 'ENOTFOUND' || err.code === 'ECONNREFUSED') {
      ienv.log.error(
        `Network connectivity error occurred, are you offline?\n` +
        `If you are behind a firewall and need to configure proxy settings, see: ${strong('https://ion.link/cli-proxy-docs')}\n\n` +
        failure(String(err.stack ? err.stack : err))
      );
    } else if (isExitCodeException(err)) {
      if (err.message) {
        if (err.exitCode > 0) {
          ienv.log.error(err.message);
        } else {
          ienv.log.msg(err.message);
        }
      }

      await processExit(err.exitCode);
    } else if (err instanceof BaseError) {
      ienv.log.error(err.message);
    } else {
      ienv.log.msg(failure(String(err.stack ? err.stack : err)));

      if (err.stack) {
        debug(failure(String(err.stack)));
      }
    }
  }
}

@ionic/utils-process

Process utils for NodeJS

MIT
Latest version published 5 months ago

Package Health Score

81 / 100
Full package analysis

Similar packages