Skip to content

Commit

Permalink
[api minor] Make jitsu logs an alias for jitsu logs app.
Browse files Browse the repository at this point in the history
  • Loading branch information
AvianFlu committed Dec 4, 2011
1 parent 8c94ead commit 7bacfc8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/jitsu.js
Expand Up @@ -160,15 +160,20 @@ jitsu.exec = function (command, callback) {
// Remark: This is a temporary fix for aliasing init=>install,
// was having a few issues with the alias command on the install resource
//
if(command[0] === 'init'){
if (command[0] === 'init'){
command[0] = 'install';
}

// Alias db to databases
if(command[0] === 'db'){
if (command[0] === 'db'){
command[0] = 'databases';
}

// Allow `jitsu logs` as a shortcut for `jitsu logs app`
if (command[0] === 'logs' && command.length === 1) {
command[1] = 'app';
}

winston.info('Executing command ' + command.join(' ').magenta);
jitsu.commands.run(command, function (err, shallow) {
if (err) {
Expand Down

0 comments on commit 7bacfc8

Please sign in to comment.