Skip to content

Commit

Permalink
Cleaver.prototype.run() now resolves the absolute path to the output …
Browse files Browse the repository at this point in the history
…location
  • Loading branch information
jdan committed Dec 26, 2013
1 parent 49ac162 commit 747916b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,17 @@ function loadSettings(source, ctx) {
* @return {Promise}
*/
function save(filename, contents) {
return Q.nfcall(fs.writeFile, filename, contents);
var deferred = Q.defer();

fs.writeFile(filename, contents, function (err, contents) {
if (err) {
deferred.reject(err);
} else {
deferred.resolve(path.resolve(filename));
}
});

return deferred.promise;
}


Expand Down

0 comments on commit 747916b

Please sign in to comment.