ember-cli/ember-cli

View on GitHub
lib/commands/unknown.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
'use strict';

const Command = require('../models/command');
const SilentError = require('silent-error');
const chalk = require('chalk');

module.exports = Command.extend({
  skipHelp: true,
  unknown: true,

  printBasicHelp() {
    return chalk.red(`No help entry for '${this.name}'`);
  },

  validateAndRun() {
    throw new SilentError(`The specified command ${this.name} is invalid. For available options, see \`ember help\`.`);
  },
});