Skip to content

Commit

Permalink
fix the indentation and wrap some things better
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Feb 5, 2014
1 parent a6a1513 commit aa82053
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/backend.js
Expand Up @@ -218,9 +218,9 @@ Backend.prototype.write_ = function(filename, data, callback) {
step(
function() {util.run('mktemp', ['-p', 'marmalade'], this)},
function(err, tempfile_) {
if (err) throw err;
tempfile = tempfile_;
fs.writeFile(tempfile, data, 'binary', this);
if (err) throw err;
tempfile = tempfile_;
fs.writeFile(tempfile, data, 'binary', this);
},
function(err) {
if (err) throw err;
Expand Down Expand Up @@ -502,10 +502,13 @@ Backend.prototype.saveTarball = function(tar, user, callback) {
}
},
function(err, pkg) {
if (err instanceof packageParser.SyntaxError) {
throw new exports.InputError("Parsing error: " + err.message);
} else if (err) throw err;
self.saveTar_(pkg, tar, user, this);
if (err instanceof packageParser.SyntaxError) {
throw new exports.InputError("Parsing error: " + err.message);
}
else if (err) {
throw err;
}
self.saveTar_(pkg, tar, user, this);
});
};

Expand Down

0 comments on commit aa82053

Please sign in to comment.