Skip to content

Commit 8fc32d2

Browse files
committed
fix behavior when no arguments provided
fixed keithwhor#3
1 parent 47be35b commit 8fc32d2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/command_line_interface.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ module.exports = (() => {
130130

131131
});
132132

133-
args = this.parse(args);
133+
if (!args || args.length < 1) {
134+
args = ['help'];
135+
}
136+
137+
args = this.parse(args);
138+
134139
if (args.names[0] === 'help') {
135140

136141
let commands = Object.keys(this.commands);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cmnd",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "Module for creating CLIs",
55
"main": "module.js",
66
"scripts": {

0 commit comments

Comments
 (0)