How to use the fatal function from cli
Find comprehensive JavaScript cli.fatal code examples handpicked from public code repositorys.
96 97 98 99 100 101 102 103
process.exit(0); } catch (err) { console.log(err); cli.fatal(err); } });
39 40 41 42 43 44 45 46 47 48
if (settings.deterministicOrder) { data.data.sort((firstFile, secondFile) => firstFile.id < secondFile.id ? -1 : 1) } json.writeFileSync(settings.dist, data, { spaces: 2 }, err => { cli.fatal(err) }) if (settings.display) { cli.info(`Total files: ${Object.keys(files).length}`)
+ 7 other calls in file
GitHub: genintho/html-minifier

140 141 142 143 144 145 146 147 148 149
return stringToRegExp(regexString); }); } } catch (e) { cli.fatal('Could not parse JSON value \'' + value + '\''); } if (jsonArray instanceof Array) { return jsonArray; }
+ 11 other calls in file
GitHub: sunny/craster

38 39 40 41 42 43 44 45 46 47
message += "For example try:\n" message += " " + example + "\n" message += "Or see the list of options with:\n" message += " craster --help" cli.fatal(message) } if (options.path) { if (!fs.existsSync(options.path)) cli.fatal("No such file: " + options.path)
+ 7 other calls in file
GitHub: jokeyrhyme/cdn-sync

35 36 37 38 39 40 41 42 43 44
cli.fatal('`init` not implemented yet') } else { fs.access(target, function (err) { if (!err) { cli.info('remove existing file or use --force') cli.fatal(target + ' already exists') } else { cli.fatal('`init` not implemented yet') } })
+ 15 other calls in file
GitHub: JoeBartelmo/goddard

124 125 126 127 128 129 130 131 132 133
if(options.close) { closeOpenStreams(); } else { if (options.ip == null) { return cli.fatal('You must run this cli application with a designated Ip address (eg: node index.js -ip 192.168.1.1)'); } //start by grabbing all camera fs.readdir('/dev/', function getCameras(err, files) { if(err) {
+ 15 other calls in file
85 86 87 88 89 90 91 92 93 94
cli.info("removed dir " + tmpDir); } cli.fatal(err.stack ? err.stack : err); }); } else { cli.fatal(err.stack ? err.stack : err); } } function runCommand(cli, command, params, ignoreFail) {
+ 23 other calls in file
GitHub: meeech/kidcut

133 134 135 136 137 138 139 140 141 142
return cut.generate_tmp_clip_path(code); }); if(input_files.length === 0) { console.log(time_codes); cli.fatal('No timecodes'); } video = ffmpeg(input_files.shift()); input_files.forEach(video.input, video);
+ 3 other calls in file