From a346c3f0433b3f90231c24b58891c924a3f99c26 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 21 Jan 2016 23:07:08 -0400 Subject: [PATCH] Add information on how to login on user permission error --- build/app.js | 2 +- lib/app.coffee | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/app.js b/build/app.js index e7692572..47cb7f65 100644 --- a/build/app.js +++ b/build/app.js @@ -37,7 +37,7 @@ limitations under the License. capitano.permission('user', function(done) { return resin.auth.isLoggedIn().then(function(isLoggedIn) { if (!isLoggedIn) { - throw new Error('You have to log in'); + throw new Error('You have to log in to continue\n\nRun the following command to go through the login wizard:\n\n $ resin login'); } }).nodeify(done); }); diff --git a/lib/app.coffee b/lib/app.coffee index 09bda087..9321cdab 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -26,7 +26,13 @@ update = require('./utils/update') capitano.permission 'user', (done) -> resin.auth.isLoggedIn().then (isLoggedIn) -> if not isLoggedIn - throw new Error ('You have to log in') + throw new Error ''' + You have to log in to continue + + Run the following command to go through the login wizard: + + $ resin login + ''' .nodeify(done) capitano.command