Skip to content

Commit

Permalink
馃殤 Handle undefined() behaviour
Browse files Browse the repository at this point in the history
Fixes #19

Signed-off-by: Carlos Cuesta <carloscuesta@me.com>
  • Loading branch information
carloscuesta committed Nov 28, 2016
1 parent d0803bc commit a6caef9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ const commands = {
hook: () => gitmojiCli.ask('hook'),
version: () => console.log(gitmojiCli.version(pkg.version)),
commit: () => gitmojiCli.ask('client'),
undefined: () => gitmojiCli.ask('client')
undefined: () => {
if (process.argv[2]==='--hook') {
gitmojiCli.ask('hook');
} else {
gitmojiCli.ask('client');
}
}
};

const arg = Object.keys(cli.flags)[1];
Expand Down

0 comments on commit a6caef9

Please sign in to comment.