UNPKG

@iexec/iapp

Version:

A CLI to guide you through the process of building an iExec iApp

8 lines 409 B
import { error as colorError } from './color.js'; export const handleCliError = ({ spinner, error, }) => { const shouldBreakLine = spinner.text && !spinner.text.endsWith('\n'); const message = error instanceof Error ? error.message : String(error); spinner.fail(colorError(spinner.text + (shouldBreakLine ? '\n' : '') + message)); process.exit(1); }; //# sourceMappingURL=handleCliError.js.map