Print an informative message after successful login

This commit is contained in:
Juan Cruz Viotti 2016-01-12 10:30:56 -04:00
parent 86cac606e4
commit 11354de596
2 changed files with 21 additions and 2 deletions

View File

@ -86,8 +86,9 @@ limitations under the License.
console.log("\nLogging in to " + resinUrl);
return login(options);
}).then(resin.auth.whoami).tap(function(username) {
events.send('user.login');
console.info("Successfully logged in as: " + username);
return events.send('user.login');
return console.info('\nNow what?\n\nRun the following command to get a device started with Resin.io\n\n $ resin quickstart\n\nFind out about more super powers by running:\n\n $ resin help\n\nIf you need help, or just want to say hi, don\'t hesitate in reaching out at:\n\n GitHub: https://github.com/resin-io/resin-cli/issues/new\n Gitter: https://gitter.im/resin-io/chat');
}).nodeify(done);
}
};

View File

@ -112,8 +112,26 @@ exports.login =
return login(options)
.then(resin.auth.whoami)
.tap (username) ->
console.info("Successfully logged in as: #{username}")
events.send('user.login')
console.info("Successfully logged in as: #{username}")
console.info '''
Now what?
Run the following command to get a device started with Resin.io
$ resin quickstart
Find out about more super powers by running:
$ resin help
If you need help, or just want to say hi, don't hesitate in reaching out at:
GitHub: https://github.com/resin-io/resin-cli/issues/new
Gitter: https://gitter.im/resin-io/chat
'''
.nodeify(done)
exports.logout =