Skip to content

Commit

Permalink
[fix] Pass this error to the user
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro committed Jul 20, 2012
1 parent 23c86a8 commit 0f65038
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ var app_start = function (repo_id, callback) {

apps.get(doc.appname, function (err, app) {
if (err) {
callback(false, err);
return callback(false, err);
} else {
var configData = {
appdir : cfg.app_dir,
Expand All @@ -866,16 +866,16 @@ var app_start = function (repo_id, callback) {
log.info('Checking: %s', configData.apphome);
if (!path.existsSync(configData.apphome)) {
//Bad install??
log.warn('App directory does not exist: %s', configData.apphome);
callback(false, err);
var msg = 'App directory does not exist: ' + configData.apphome;
log.warn(msg);
callback(new Error(msg));
return;
}
log.info('Checking: %s', path.join(configData.apphome, app.start));
if (!path.existsSync(path.join(configData.apphome, app.start))) {
//Bad install??
log.warn('App start file does not exist: %s', path.join(configData.apphome, app.start));
callback(false, err);
return;
var msg = 'App start file does not exist: %s', path.join(configData.apphome, app.start)
log.warn(msg);
return callback(new Error(msg));
}

log.info('Checking: %s', path.join(configData.apprwfolder, '.nodester'));
Expand Down

0 comments on commit 0f65038

Please sign in to comment.