From e87412e7ee6996ca59afcbe295a3a137a19a03bd Mon Sep 17 00:00:00 2001 From: Naomi Seyfer Date: Thu, 16 May 2013 12:13:11 -0700 Subject: [PATCH] Make one part of deploy not depend on the context to have Meteor.Error --- tools/deploy-galaxy.js | 7 +------ tools/deploy.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/deploy-galaxy.js b/tools/deploy-galaxy.js index b164e8ee06..702cd19506 100644 --- a/tools/deploy-galaxy.js +++ b/tools/deploy-galaxy.js @@ -34,17 +34,12 @@ var getGalaxy = function (context) { }; -// XXX copied from galaxy/tool/galaxy.js var exitWithError = function (error, messages) { messages = messages || {}; - - if (! (error instanceof Meteor.Error)) - throw error; // get a stack - var msg = messages[error.error]; if (msg) process.stderr.write(msg + "\n"); - else if (error instanceof Meteor.Error) + else if (error.message) process.stderr.write("Denied: " + error.message + "\n"); process.exit(1); diff --git a/tools/deploy.js b/tools/deploy.js index db3798fc1f..e61d555081 100644 --- a/tools/deploy.js +++ b/tools/deploy.js @@ -93,7 +93,7 @@ var deployToServer = function (app_dir, bundleOptions, deployOptions) { var bundleResult = bundler.bundle(app_dir, bundle_path, bundleOptions); if (bundleResult.errors) { process.stdout.write("\n\nErrors prevented deploying:\n"); - process.stdout.write(bundleresult.errors.formatMessages()); + process.stdout.write(bundleResult.errors.formatMessages()); process.exit(1); }