cli-engine-command
Advanced tools
Comparing version 2.2.6 to 2.2.7
@@ -27,9 +27,4 @@ 'use strict'; | ||
var _helpError = require('./help-error'); | ||
var _helpError2 = _interopRequireDefault(_helpError); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// eslint-disable-line | ||
class Command extends _output2.default { | ||
@@ -72,3 +67,3 @@ constructor(...args) { | ||
} catch (err) { | ||
if (config.mock || err instanceof _helpError2.default) throw err; | ||
if (config.mock) throw err; | ||
cmd.error(err); | ||
@@ -99,4 +94,6 @@ } | ||
} | ||
exports.default = Command; | ||
exports.default = Command; // eslint-disable-line | ||
Command.aliases = []; | ||
Command.variableArgs = false; | ||
Command.variableArgs = false; | ||
Command.args = []; |
@@ -11,8 +11,2 @@ 'use strict'; | ||
var _helpError = require('./help-error'); | ||
var _helpError2 = _interopRequireDefault(_helpError); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
class Parse { | ||
@@ -34,3 +28,2 @@ constructor(input) { | ||
if (!name) { | ||
if (arg === '--help' || arg === '-h') throw new _helpError2.default(); | ||
const i = arg.indexOf('='); | ||
@@ -37,0 +30,0 @@ if (i !== -1) { |
@@ -32,3 +32,3 @@ 'use strict'; | ||
if (command.description) this.out.log(`${command.description.trim()}\n`); | ||
let flags = Object.keys(command.flags).map(f => [f, command.flags[f]]).filter(f => !f[1].hidden); | ||
let flags = Object.keys(command.flags || {}).map(f => [f, command.flags[f]]).filter(f => !f[1].hidden); | ||
if (flags.length) this.out.log(`${this.renderFlags(flags)}\n`); | ||
@@ -35,0 +35,0 @@ if (command.help) this.out.log(`${command.help.trim()}\n`); |
{ | ||
"name": "cli-engine-command", | ||
"description": "base CLI command for cli-engine", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"author": "Jeff Dickey @dickeyxxx", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/heroku/cli-engine-command/issues", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140655
44
2106