<commit_before>const ora = require('ora');
const CommandParser = require('../command-parser');
const { formatVersion, getInstanceVersion, printInfo } = require('../../util/info');

module.exports =
class Info extends CommandParser {
  constructor(args) {
    super(args);

    this.requiresConfigFile = true;
  }

  action() {
    const spinner = ora('Retrieving instance info...').start();
    getInstanceVersion().then(({ version, latency }) => {
      spinner.stop();
      printInfo({
        Version: formatVersion(version),
        Latency: latency
      });
    });
  }
};<commit_msg>`now info` errors now actually print.<commit_after>const ora = require('ora');
const CommandParser = require('../command-parser');
const {
  formatVersion,
  getInstanceVersion,
  printInfo
} = require('../../util/info');

module.exports = class Info extends CommandParser {
  constructor(args) {
    super(args);

    this.requiresConfigFile = true;
  }

  action() {
    const spinner = ora('Retrieving instance info...').start();
    getInstanceVersion().then(response => {
      if (response) {
        const { version, latency } = response;
        printInfo({
          Version: formatVersion(version),
          Latency: latency
        });
      }
      spinner.stop();
    });
  }
};
{'fraction_non_alphanumeric': 0.15510522213561964, 'fraction_numerical': 0.0, 'mean_word_length': 2.975232198142415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7621801', 'n_tokens_mistral': 369, 'n_tokens_neox': 354, 'n_words': 79}