We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7881c16 commit bc2e8e5Copy full SHA for bc2e8e5
cli.js
@@ -57,14 +57,22 @@ const cli = meow(`
57
58
updateNotifier({pkg}).notify();
59
60
+if (cli.input.length === 0 && cli.flags.v === true) {
61
+ cli.showVersion();
62
+}
63
+
64
+if (cli.input.length === 0 && cli.flags.h === true) {
65
+ cli.showHelp(0);
66
67
68
if (cli.input.length !== 1) {
69
console.log(`\n${logSymbols.error} Invalid input. Please check the help below:`);
70
cli.showHelp();
71
}
72
73
if (Object.keys(cli.flags).map(key => typeof cli.flags[key]).some(type => type === 'boolean')) {
74
console.log(`\n${logSymbols.error} Wrong option(s) provided. Please check the help below:`);
- cli.showHelp(2);
75
+ cli.showHelp();
76
77
78
errorNotifier(cli.input[0], cli.flags)
0 commit comments