Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Lambda.prototype.run = function (program) {
Lambda.prototype._runHandler = function (handler, event) {
var context = {
succeed: function (result) {
console.log('succeed: ' + JSON.stringify(result));
console.log('succeed: ' + result);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask why you remove the JSON.stringify here? I'm assuming this was added so the logging would dump all data instead of to a certain nested limit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, should not have been removed

process.exit(0);
},
fail: function (error) {
Expand Down Expand Up @@ -205,13 +205,13 @@ Lambda.prototype.deploy = function (program) {

_this._rsync(program, codeDirectory, function (err) {
if (err) {
console.error(err);
throw err;
return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the returns still necessary when a throw already occurred?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, you're right

}
console.log('=> Running npm install --production');
_this._npmInstall(program, codeDirectory, function (err) {
if (err) {
console.error(err);
throw err;
return;
}

Expand All @@ -226,7 +226,7 @@ Lambda.prototype.deploy = function (program) {

archive(program, codeDirectory, function (err, buffer) {
if (err) {
console.error(err);
throw err;
return;
}

Expand Down Expand Up @@ -259,7 +259,7 @@ Lambda.prototype.deploy = function (program) {

}, function (err, results) {
if (err) {
console.error(err);
throw err;
} else {
console.log('=> Zip file(s) done uploading. Results follow: ');
console.log(results);
Expand Down