error.js
This file
Path
lib/verbose/error.js
13 lines · 306 bytes · JavaScript
Last changed by
Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
History of this fileTake it
1234567891011121314import {verboseLog} from './log.js';
// When `verbose` is `short|full|custom`, print each command's error when it failsexport const logError = (result, verboseInfo) => { if (result.failed) { verboseLog({ type: 'error', verboseMessage: result.shortMessage, verboseInfo, result, }); }};