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
Add colors to `verbose` option (#893)ehmickybefore adoption281d504
line 1why, one step back1import {redBright, yellowBright} from 'yoctocolors';Print errors with verbose option (#890)ehmickybefore adoption209f78f
lines 2–4why, one step back2import {verboseLog} from './log.js';34// When `verbose` is `short|full`, print each command's error when it failsAdd colors to `verbose` option (#893)ehmickybefore adoption281d504
line 5why, one step back5export const logError = ({message, failed, reject, verboseId, icon}) => {Print errors with verbose option (#890)ehmickybefore adoption209f78f
lines 6–9why, one step back6 if (!failed) {7 return;8 }9Add colors to `verbose` option (#893)ehmickybefore adoption281d504
lines 10–11why, one step back10 const color = reject ? redBright : yellowBright;11 verboseLog(message, verboseId, icon, color);Print errors with verbose option (#890)ehmickybefore adoption209f78f
line 12why, one step back12};