MCPcopy
hub / github.com/skygragon/leetcode-cli / onTaskDone

Function onTaskDone

lib/commands/submission.js:59–68  ·  view source on GitHub ↗
(e, msg)

Source from the content-addressed store, hash-verified

57 const argv = queue.ctx.argv;
58
59 function onTaskDone(e, msg) {
60 // NOTE: msg color means different purpose:
61 // - red: error
62 // - green: accepted, fresh download
63 // - yellow: not ac-ed, fresh download
64 // - white: existed already, skip download
65 log.printf('[%=4s] %-60s %s', problem.fid, problem.name,
66 (e ? chalk.red('ERROR: ' + (e.msg || e)) : msg));
67 if (cb) cb(e);
68 }
69
70 if (argv.extra) {
71 // have to get problem details, e.g. problem description.

Callers

nothing calls this directly

Calls 1

cbFunction · 0.85

Tested by

no test coverage detected