Permalink
Browse files

Refactored to match the style.

  • Loading branch information...
1 parent 5f7c9ee commit 11a57bdd659b42b4e6043c9b0f25d703eba697e7 @SaltwaterC committed Feb 28, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/mime-magic.js
View
@@ -8,11 +8,13 @@ var fileWrapper = function (path, cb) {
cp.execFile(fileExec, fileFlags.concat(Array.isArray(path) ? path : [path]), function (err, stdout) {
stdout = stdout.trim();
if (err) {
- if (stdout)
+ if (stdout) {
err.message = stdout;
+ }
cb(err);
- } else
+ } else {
cb(null, Array.isArray(path) ? stdout.split('\n') : stdout);
+ }
});
};
exports.fileWrapper = fileWrapper;

0 comments on commit 11a57bd

Please sign in to comment.