remove some extra lines

This commit is contained in:
AJ ONeal 2018-06-28 15:43:34 -06:00
parent fcc6c6c5b5
commit 3f319c5e9e
1 changed files with 16 additions and 19 deletions

View File

@ -92,7 +92,6 @@ if (!confpath || /^--/.test(confpath)) {
function askForConfig(answers, mainCb) { function askForConfig(answers, mainCb) {
answers = answers || {}; answers = answers || {};
//console.log("Please create a config file at '" + confpath + "' or specify --config /path/to/config");
var fs = require('fs'); var fs = require('fs');
var ttyname = '/dev/tty'; var ttyname = '/dev/tty';
var stdin = useTty ? fs.createReadStream(ttyname, { var stdin = useTty ? fs.createReadStream(ttyname, {
@ -117,7 +116,7 @@ function askForConfig(answers, mainCb) {
var firstSet = [ var firstSet = [
function askEmail(cb) { function askEmail(cb) {
if (answers.email) { cb(); return; } if (answers.email) { cb(); return; }
console.info(""); //console.info("");
console.info("Welcome!"); console.info("Welcome!");
console.info(""); console.info("");
console.info("By using Telebit you agree to:"); console.info("By using Telebit you agree to:");
@ -350,7 +349,6 @@ var utils = {
var body = ''; var body = '';
function finish() { function finish() {
console.info("");
if (200 !== resp.statusCode) { if (200 !== resp.statusCode) {
console.warn(resp.statusCode); console.warn(resp.statusCode);
console.warn(body || ('get' + service + ' failed')); console.warn(body || ('get' + service + ' failed'));
@ -405,7 +403,6 @@ var utils = {
}); });
} }
, putConfig: function putConfig(service, args, fn) { , putConfig: function putConfig(service, args, fn) {
// console.log('got it', service, args);
var req = http.get({ var req = http.get({
socketPath: state._ipc.path socketPath: state._ipc.path
, method: 'POST' , method: 'POST'
@ -540,17 +537,17 @@ function parseConfig(err, text) {
// TODO make one request to set and then poll for readiness // TODO make one request to set and then poll for readiness
if (!answers.token && answers._can_pair) { if (!answers.token && answers._can_pair) {
console.log(""); console.info("");
console.log("=============================================="); console.info("==============================================");
console.log(" Hey, Listen! "); console.info(" Hey, Listen! ");
console.log("=============================================="); console.info("==============================================");
console.log(" "); console.info(" ");
console.log(" GO CHECK YOUR EMAIL! "); console.info(" GO CHECK YOUR EMAIL! ");
console.log(" "); console.info(" ");
console.log(" DEVICE PAIR CODE: 0000 ".replace(/0000/g, answers._otp)); console.info(" DEVICE PAIR CODE: 0000 ".replace(/0000/g, answers._otp));
console.log(" "); console.info(" ");
console.log("=============================================="); console.info("==============================================");
console.log(""); console.info("");
} }
// TODO use php-style object querification // TODO use php-style object querification
@ -567,13 +564,13 @@ function parseConfig(err, text) {
utils.putConfig('enable', [], function () { utils.putConfig('enable', [], function () {
utils.putConfig('list', [], function (err) { utils.putConfig('list', [], function (err) {
if (err) { console.error(err); return; } if (err) { console.error(err); return; }
console.log("Success"); console.info("Success");
// workaround for https://github.com/nodejs/node/issues/21319 // workaround for https://github.com/nodejs/node/issues/21319
if (answers._useTty) { if (answers._useTty) {
setTimeout(function () { setTimeout(function () {
console.log(); console.info();
console.log("Press any key to continue..."); console.info("Press any key to continue...");
console.log(); console.info();
process.exit(0); process.exit(0);
}, 0.5 * 1000); }, 0.5 * 1000);
} }