error.js
This file
Path
lib/verbose/error.js
12 lines · 370 bytes · JavaScript
Last changed by
Add colors to `verbose` option (#893)ehmickybefore adoption281d504
History of this fileTake it
12345678910111213import {redBright, yellowBright} from 'yoctocolors';import {verboseLog} from './log.js';
// When `verbose` is `short|full`, print each command's error when it failsexport const logError = ({message, failed, reject, verboseId, icon}) => { if (!failed) { return; }
const color = reject ? redBright : yellowBright; verboseLog(message, verboseId, icon, color);};