UNPKG

@atlassian/wrm-troubleshooting

Version:

A tool that can help you with troubleshooting the configuration of webpack and Atlassian P2 project.

22 lines 668 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAsyncHandler = void 0; /** * This function will wrap a yargs handler command with try/catch. * The async will catch any error, display error message, and exist with error code */ function getAsyncHandler(handler) { return async function asyncHandler(options) { try { await handler(options); process.exit(0); } catch (err) { const error = err; console.log(error.message); process.exit(1); } }; } exports.getAsyncHandler = getAsyncHandler; //# sourceMappingURL=yargsHelper.js.map