mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
style(CLI): Improvements
This commit is contained in:
parent
3dd915cd3f
commit
b09d4255a7
@ -68,11 +68,7 @@ class CLI {
|
||||
const options = processedInput.options;
|
||||
|
||||
// if asked for version explicitly
|
||||
if (
|
||||
options.version ||
|
||||
options.v ||
|
||||
(commands.length === 1 && commands.indexOf('version') > -1)
|
||||
) {
|
||||
if (options.version || options.v || (commands.length === 1 && commands[0] === 'version')) {
|
||||
this.getVersionNumber();
|
||||
return true;
|
||||
}
|
||||
@ -89,7 +85,7 @@ class CLI {
|
||||
// If no commands and asked for help specifically
|
||||
(commands.length === 0 && (options.help || options.h)) ||
|
||||
// If asked for help specifically via "help" command
|
||||
(commands.length === 1 && commands.indexOf('help') > -1)
|
||||
(commands.length === 1 && commands[0] === 'help')
|
||||
) {
|
||||
if (options.verbose) {
|
||||
this.generateVerboseHelp();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user