8000 exit with -1 on deploy error by Mekajiki · Pull Request #62 · motdotla/node-lambda · GitHub
[go: up one dir, main page]

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
10BC0 Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ Lambda.prototype.deploy = function (program) {
_this._rsync(program, codeDirectory, function (err) {
if (err) {
console.error(err);
return;
process.exit(-1);
}
console.log('=> Running npm install --production');
_this._npmInstall(program, codeDirectory, function (err) {
if (err) {
console.error(err);
return;
process.exit(-1);
}

// Add custom environment variables if program.configFile is defined
Expand All @@ -227,7 +227,7 @@ Lambda.prototype.deploy = function (program) {
archive(program, codeDirectory, function (err, buffer) {
if (err) {
console.error(err);
return;
process.exit(-1);
}

console.log('=> Reading zip file to memory');
Expand Down Expand Up @@ -260,9 +260,11 @@ Lambda.prototype.deploy = function (program) {
}, function (err, results) {
if (err) {
console.error(err);
process.exit(-1);
} else {
console.log('=> Zip file(s) done uploading. Results follow: ');
console.log(results);
process.exit(0);
}
});

Expand Down
0